-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(cdk/menu): prevent default selection key actions #26051
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
Conversation
Fixes that the CDK menu wasn't calling `preventDefault` on the enter key presses which caused it to immediately close, because it would allow the click handler to fire as well. Fixes angular#26033.
Just curious, does this fix will goto version 14.*? |
It won't. We generally don't backport fixes unless they're security-related. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In angular#26051 a couple of `preventDefault` calls were added, because we were moving focus within an enter key `keydown` event which was causing the menu to close immediately after it opens. The problem is that the calls also prevent links from navigating. These changes remove the `preventDefault` calls and resolve the initial issue by ignoring clicks initiated by the keyboard. Fixes angular#26291.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that the CDK menu wasn't calling
preventDefault
on the enter key presses which caused it to immediately close, because it would allow the click handler to fire as well.Fixes #26033.