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

[@mantine/core] Modal: Overlay respects scrollbar #2669

Merged
merged 1 commit into from Oct 11, 2022

Commits on Oct 9, 2022

  1. [@mantine/core] Modal overlay respects scrollbar width

    If a modal has overflow set to outside, the overlay covers the scrollbar. This causes the modal to close by default if the scrollbar is clicked.
    
    This fix moves the overlay outside the modal-inner container, removes the mousedown event from the overlay and instead puts an onClick handler onto the modal-inner div.
    
    Event propagation is also stopped when clicking the modal itself so that clicking inside the modal won't close the modal. This should take care of any clickable components or components like MultiSelect that render outside the modal to work correctly.
    armanatz committed Oct 9, 2022
    Copy the full SHA
    07b5c30 View commit details
    Browse the repository at this point in the history