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(material/sidenav): ignore escape events while overlay is open #30706

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

The sidenav isn't an overlay so it doesn't participate in the common event handling. This means that if there's an overlay in it that closes by pressing escape, the sidenav will close instead of the overlay.

These changes add a check that will skip escape key presses while there are open overlays.

Fixes #30507.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Mar 25, 2025
@crisbeto crisbeto requested a review from a team as a code owner March 25, 2025 08:41
@crisbeto crisbeto requested review from mmalerba and wagnermaciel and removed request for a team March 25, 2025 08:41
The sidenav isn't an overlay so it doesn't participate in the common event handling. This means that if there's an overlay in it that closes by pressing escape, the sidenav will close instead of the overlay.

These changes add a check that will skip escape key presses while there are open overlays.

Fixes angular#30507.
@crisbeto crisbeto force-pushed the 30507/sidenav-escape branch from f1af7c1 to d8d40f0 Compare March 25, 2025 08:54
@crisbeto
Copy link
Member Author

I ran this through our internal tests which revealed some places where this would've been breaking. Will close so we can figure out a different approach.

@crisbeto crisbeto closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(MatSelect): When panel is displayed inside a SideNav, it stays opened on Escape button
1 participant