-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Menu with disabled options doesn't close on ESC #16565
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
andrewseguin
added
the
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
label
Jul 19, 2019
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jul 19, 2019
Currently we depend on `focusFirstItem` to bring focus into the menu, however if all the items are disabled, focus will stay on the trigger and the user won't get feedback that something has happened. Furthermore, the keyboard shortcuts that are implemented in the menu won't work either, because the keyboard event listener is on the menu. These changes work around the issue by setting focus on the `role="menu"` if none of the items were focusable. Fixes angular#16565.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jul 19, 2019
Currently we depend on `focusFirstItem` to bring focus into the menu, however if all the items are disabled, focus will stay on the trigger and the user won't get feedback that something has happened. Furthermore, the keyboard shortcuts that are implemented in the menu won't work either, because the keyboard event listener is on the menu. These changes work around the issue by setting focus on the `role="menu"` if none of the items were focusable. Fixes angular#16565.
jelbourn
pushed a commit
that referenced
this issue
Aug 27, 2019
…16572) Currently we depend on `focusFirstItem` to bring focus into the menu, however if all the items are disabled, focus will stay on the trigger and the user won't get feedback that something has happened. Furthermore, the keyboard shortcuts that are implemented in the menu won't work either, because the keyboard event listener is on the menu. These changes work around the issue by setting focus on the `role="menu"` if none of the items were focusable. Fixes #16565.
mmalerba
pushed a commit
to mmalerba/components
that referenced
this issue
Aug 27, 2019
…ngular#16572) Currently we depend on `focusFirstItem` to bring focus into the menu, however if all the items are disabled, focus will stay on the trigger and the user won't get feedback that something has happened. Furthermore, the keyboard shortcuts that are implemented in the menu won't work either, because the keyboard event listener is on the menu. These changes work around the issue by setting focus on the `role="menu"` if none of the items were focusable. Fixes angular#16565.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-y1wytp?file=app/menu-icons-example.html
Steps to reproduce:
Expected Behavior
The menu should close after pressing ESC key, same as it does when it contains at least one non-disabled option
Actual Behavior
The menu does not close after pressing ESC key
Environment
The text was updated successfully, but these errors were encountered: