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

Fullscreen modal get cutted on the left on Windows and Linux #1721

Closed
7iomka opened this issue Jul 2, 2022 · 1 comment
Closed

Fullscreen modal get cutted on the left on Windows and Linux #1721

7iomka opened this issue Jul 2, 2022 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@7iomka
Copy link
Contributor

7iomka commented Jul 2, 2022

What package has an issue

@mantine/core

Describe the bug

https://v5.mantine.dev/changelog/5-0-0/#fullscreen-modal

Inner padding for content of modal (20px in this example) get cutted by negative margin

margin-left: calc(var(--removed-scroll-width, 0px) * -1);

In which browser did the problem occur

Chrome

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

No response

Are you willing to participate in fixing this issue and create a pull request with the fix

No response

Possible fix

You need to choose different workarounds for 2 cases - when overflow="outside" or "inside"
If outside, put padding with var(--removed-scroll-width, 0px) on fixed wrapper
If inside maybe the same, because it the same behavior when is fullwidth.

Another case that needed to be fixed is time when --removed-scroll-width was calculated.
For now is calculated AFTER modal was open. This cause CLS for fullwidth variant, and this is not good.

@7iomka 7iomka added the bug label Jul 2, 2022
@rtivital rtivital changed the title [V5] Fullscreen modal get cutted on the left Fullscreen modal get cutted on the left Jul 25, 2022
@rtivital rtivital removed the bug label Aug 11, 2022
@rtivital rtivital changed the title Fullscreen modal get cutted on the left Fullscreen modal get cutted on the left on Windows and Linux Aug 13, 2022
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Aug 14, 2022
@rtivital
Copy link
Member

Fixed in 5.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants