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/select): added ecs click handling in host keydown #30520

Closed
wants to merge 1 commit into from

Conversation

Veribelll
Copy link
Contributor

The esc button was processed only in the overlay, which led to the container not closing in sidenav.

Fixes #30507

The esc button was processed only in the overlay, which led to the container not closing in sidenav.

Fixes angular#30507
@Veribelll Veribelll marked this pull request as ready for review February 19, 2025 18:59
@Veribelll Veribelll requested a review from a team as a code owner February 19, 2025 18:59
@Veribelll Veribelll requested review from crisbeto and andrewseguin and removed request for a team February 19, 2025 18:59
@@ -1033,6 +1033,10 @@ export class MatSelect
hasDeselectedOptions ? option.select() : option.deselect();
}
});
} else if (event.keyCode === ESCAPE && !hasModifierKey(event)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this would fix the issue at the moment, we have a TODO to move all of this logic into _handleOverlayKeydown for better interop with the rest of the overlays. Once that happens the sidenav use case will break again so I'm not sure we should land the change just to have it regress later.

@Veribelll Veribelll closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
2 participants