Ctrl+W shortcut on dialogs sometimes doesn't work #9826
Labels
bug
Confirmed bugs or reports that are very likely to be bugs
priority-3
Bugs that affect small number of users and/or relatively cosmetic in nature
windows
Issues specific Desktop usage on Windows
Describe the bug
Depending on where you click on the dialog, Ctrl+W shortcut may not work.
Version & OS
Version: 2.5.0
OS: Windows 10
Steps to reproduce the behavior
Expected behavior
Dialog closes.
Actual behavior
Nothing happens.
Screenshots
Logs
Logs not helpful in my opinion.
Additional context
The problem is that when you press on the header (or other areas..), focus is put on
body
(you can see withdocument.activeElement
) and so onKeyDown listener (of the dialog element) is not triggered.My idea is to put
tabIndex={-1}
to thedialog
element. So, when header is pressed, focus is put ondialog
element andonKeyDown
listener is triggered correctly.I Think that addressing this issue can make #3629 and #5911 easily fixable
The text was updated successfully, but these errors were encountered: