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

Modal overlay is rendered above the scroll #2371

Closed
italodeandra opened this issue Sep 6, 2022 · 6 comments · Fixed by #2445 or #2669
Closed

Modal overlay is rendered above the scroll #2371

italodeandra opened this issue Sep 6, 2022 · 6 comments · Fixed by #2445 or #2669
Labels
help wanted Contributions from community are welcome

Comments

@italodeandra
Copy link
Contributor

italodeandra commented Sep 6, 2022

What package has an issue

@mantine/modals

Describe the bug

image

You can scroll normally using the mouse scroll, but if you try clicking the scroll bar you actually click the overlay triggering the modal to close.

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

https://mantine.dev/others/modals/

Do you know how to fix the issue

Yes

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

Yes

@rtivital
Copy link
Member

rtivital commented Sep 6, 2022

@italodeandra feel free to send a PR with a fix

@rtivital rtivital added the help wanted Contributions from community are welcome label Sep 14, 2022
@rtivital
Copy link
Member

Help is still wanted on this, if someone wants to submit a PR feel free to ping me here.

@IdrisIsra
Copy link
Contributor

@rtivital I think I have a fix, please review PR.

@rtivital
Copy link
Member

Issue is not fixed, #2445 is not a valid solution as click outside events do not work

@IdrisIsra
Copy link
Contributor

IdrisIsra commented Sep 17, 2022

My bad, didn't notice that issue.

I'm kind of at a loss, any ideas? The only thing I can think of right now is to change the inset of the overlay so that it does not cover the scrollbar to the right, but this would need to be mirrored in RTL situations and it would also need to not do this on mobile resolutions. As far as I know there's no way to give position: absolute to the scrollbar to make it have priority, and I'm not sure if putting a transform on it to move it up would be a good idea. Maybe something that I don't know?

@armanatz
Copy link
Contributor

armanatz commented Oct 9, 2022

@rtivital I was facing the same problem and I believe I fixed it with my PR #2669. Waiting on your review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions from community are welcome
Projects
None yet
4 participants