You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A listener to the document must be added if Escape keydown is to be listened on some very specific cases:
no focusable element inside the Dialog
focus outside of Dialog on a non-modal dialog
New Behavior
Removes the global document listener to Escape keydown handling.
Reasons
the no focusable element inside the Dialog is a discouraged scenario
on the case of focus outside of a non-modalDialog then Escape key closing the Dialog might no be ideal, as Escape can be linked with another behaviour.
Are you sure the Escape dismiss is only for those cases ? the APG design pattern explicitly states that Escape should be used to close the dialog. While the document listener might not be needed, we should probably just use a react event listener for the dialog
I'm sorry, I might not have been clear enough, we still support Escape to close dialog.
this PR only removes the support for the edge cases where a document listener for Escape is required, Escape is still evaluated properly inside the Dialog
I'm sorry, I might not have been clear enough, we still support Escape to close dialog.
this PR only removes the support for the edge cases where a document listener for Escape is required, Escape is still evaluated properly inside the Dialog
Ah ok, sorry I misunderstood, I still have vacation glasses on :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splitting from #24668
Current Behavior
A listener to the document must be added if
Escapekeydown is to be listened on some very specific cases:DialogDialogon anon-modaldialogNew Behavior
Removes the global document listener to
Escapekeydown handling.Reasons
Dialogis a discouraged scenarionon-modalDialogthenEscapekey closing theDialogmight no be ideal, asEscapecan be linked with another behaviour.