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

fix: fixes overlay errors when closing Modal and the page is inaccessible when closed by Overlay with isModal enabled #5359

Merged
merged 4 commits into from
Feb 7, 2023

Conversation

matuzalemsteles
Copy link
Member

Fixes #5332

This PR fixes some Overlay things when interacting with the Modal, there is still the problem that having a component that uses the Overlay inside the Modal pressing esc will still close the Modal because the Modal has not been refactored to use the Overlay component yet #5221.

This PR also adds the possibility of having Overlay stacked which allows avoiding for example closing all overlays at once when pressing esc, clicking outside the overlay or moving the focus to another element. For example, DropDown with ColorPicker, Modal with any other component that uses Overlay, DropDown with cascading when using keyboard navigation.

…ng elements with inert

When you have some component inside the Modal that is using the Overlay component with inert support when closing the modal it doesn't remove the inert attribute making the page inaccessible.
There are use cases where you can have Overlay components stacked, for example DropDown with ColorPicker, Modal with any other Overlay. If the user clicks outside the overlay it will close all overlays, as well as any other interaction the overlay handles, like pressing esc.

This implementation only handle with events if the overlay is the last element of the stack, allowing to have an overlay stacked.
@matuzalemsteles matuzalemsteles merged commit 5b00bcb into liferay:master Feb 7, 2023
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.

Date Picker inside Modal breaks page if changed
1 participant