-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix: prevent default on escape key presses #16202
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: prevent default on escape key presses #16202
Conversation
LGTM, should be fine to leave them all in one PR as long as the presubmit goes ok |
@crisbeto looks like we have a test in tooltip that needs to be udpated for this change |
e36b43a
to
37024bf
Compare
Sorted out the test failure. |
Adds a `preventDefault` to the escape key presses of the popover edit and ignores escape presses that have a modifier key. This prevents Safari from exiting fullscreen mode and avoids interfering with other OS-level actions. We already made a pass to add this logic to all other overlay components in angular#16202, but it looks like we missed the popover edit.
Adds a `preventDefault` to the escape key presses of the popover edit and ignores escape presses that have a modifier key. This prevents Safari from exiting fullscreen mode and avoids interfering with other OS-level actions. We already made a pass to add this logic to all other overlay components in #16202, but it looks like we missed the popover edit.
Adds a `preventDefault` to the escape key presses of the popover edit and ignores escape presses that have a modifier key. This prevents Safari from exiting fullscreen mode and avoids interfering with other OS-level actions. We already made a pass to add this logic to all other overlay components in #16202, but it looks like we missed the popover edit. (cherry picked from commit 48cc514)
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. |
Calls
preventDefault
on all handlers that deal with the escape key, except when a modifier is pressed since the user might've intended something different. We need to prevent the default action, because Safari will exit fullscreen mode if the user has it enabled and we want to prevent any other OS-level actions.I've split this into one commit per component as we've discussed, but I can separate them into different PRs if necessary.
Fixes #16105.