Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UModal gains padding when used on mobile with the fullscreen prop #811

Closed
KeoneSomers opened this issue Oct 12, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@KeoneSomers
Copy link

Environment

Version

v2.9.0

Reproduction

https://ui.nuxt.com/overlays/modal#fullscreen

You can simple head to the docs for the fullscreen modal, open the modal and resize the browser to a smaller mobile size and the padding will appear around the modal.

Description

When using the UModal component with the "fullscreen" prop and changing the screen size to mobile using the browser dev tools, the modal gains a p-4 class on the backdrop element that is not normally there when fullscreen is enabled.

This effect only seems to occur on mobile screens and when the screen size is increased the padding is lost and the fullscreen modal looks normal again.

I have also been able to reproduce it on a mobile device and had the same effect.

Due to the extra padding, on mobile the screen agains a scrollbar to account for the extra vertical space.

Additional context

image

Logs

No response

@KeoneSomers KeoneSomers added the bug Something isn't working label Oct 12, 2023
Copy link
Member

Thanks for the report 😊

@lisisistemas
Copy link

Hi All,
How can I change the width of a UModal component? I´m trying to do this, but no success.
Thanks in advance.

@BillSamaras
Copy link

@lisisistemas

You can try to add

<UModal :ui="{ width: 'w-full sm:max-w-3xl' }">

at your UModal.

I had the same issue, but I managed to get through based on the documentation here
https://ui.nuxt.com/getting-started/theming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants