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

[Dialog] Align disableOutsidePointerEvents to trapFocus prop #2849

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pedrosousa13
Copy link

Description

We were trying to use forceMount on our Dialog implementation of the component. Our idea is to have the modals be in the DOM but not visible until the Trigger is clicked.

Doing this, we noticed that the trapFocus worked correctly but the disableOutsidePointerEvents prop was adding pointer-events: none to a lot of elements so you couldn't interact with the page.

By aligning this behavior with trapFocus, everything works as intended and the pointer event styles aren't added if the modal is closed.

@pedrosousa13 pedrosousa13 changed the title fix(dialog): align disableOutsidePointerEvents to trapFocus prop [Dialog] Align disableOutsidePointerEvents to trapFocus prop Apr 18, 2024
@pedrosousa13
Copy link
Author

Can someone take a look at this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant