Closing Dialog using escape only works after initial open w/ button focused #3009
Labels
Accessibility
This issue is related to accessibility (a11y)
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Dialog should close when escape is pressed, regardless of what is in focus.
What is the current behavior?
If the user interacts with the dialog in any way (causing the initial focus to be lost), pressing escape no longer closes the dialog.
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
See: https://material.angular.io/components/component/dialog
What is the use-case or motivation for changing an existing behavior?
A user should be able to press escape to close the dialog at any time.
Which versions of Angular, Material, OS, browsers are affected?
Seemingly all
Is there anything else we should know?
No
The text was updated successfully, but these errors were encountered: