diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-10-01 11:04:49 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-10-01 11:04:49 +0000 |
| commit | 8bc88f75ea82dcdcf218e5114d12f72d6b37cf3b (patch) | |
| tree | 125a18b6b1f2759df30a6f2d8b54389f8aea9d49 /resources/assets/javascripts/bootstrap | |
| parent | de136ea2be9eb2c7f10b65bc02c7ef8e1d2214cf (diff) | |
rework keyboard focus management for action menues, fixes #4641
Closes #4641
Merge request studip/studip!3457
Diffstat (limited to 'resources/assets/javascripts/bootstrap')
| -rw-r--r-- | resources/assets/javascripts/bootstrap/actionmenu.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/resources/assets/javascripts/bootstrap/actionmenu.js b/resources/assets/javascripts/bootstrap/actionmenu.js index 5cc6021..bb6371d 100644 --- a/resources/assets/javascripts/bootstrap/actionmenu.js +++ b/resources/assets/javascripts/bootstrap/actionmenu.js @@ -34,19 +34,4 @@ STUDIP.ActionMenu.closeAll(); } }); - - // Close all action menus when the escape key is pressed and rotate through all its items - // when TAB or SHIFT + TAB is pressed. - $(document).on('keydown', function(event) { - if (event.key === 'Escape') { - STUDIP.ActionMenu.closeAll(); - } else if (event.key === 'Tab') { - //Check if the focus is inside an action menu: - let menu = $(event.target).closest('.action-menu'); - if (menu.hasClass('is-open') && STUDIP.ActionMenu.tabThroughItems(menu, event.shiftKey)) { - event.preventDefault(); - } - } - }); - }(jQuery)); |
