diff options
author | Joas Schilling <coding@schilljs.com> | 2022-09-14 16:46:24 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-09-15 11:20:08 +0200 |
commit | 5267ea26241028cf193c0917f5ffd72adbba826f (patch) | |
tree | 4b0fdf921dd394469293927659bd4f4f31ac28f7 /core/src/components | |
parent | 7672152579447d1cc465a41d1b90004045236c29 (diff) | |
download | nextcloud-server-5267ea26241028cf193c0917f5ffd72adbba826f.tar.gz nextcloud-server-5267ea26241028cf193c0917f5ffd72adbba826f.zip |
Add an OCP method to check the shortcut state and use it for global search and menu control
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/src/components')
-rw-r--r-- | core/src/components/HeaderMenu.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/components/HeaderMenu.vue b/core/src/components/HeaderMenu.vue index 172ea7268d8..a2c19194b45 100644 --- a/core/src/components/HeaderMenu.vue +++ b/core/src/components/HeaderMenu.vue @@ -81,6 +81,7 @@ export default { handler: this.closeMenu, middleware: this.clickOutsideMiddleware, }, + shortcutsDisabled: OCP.Accessibility.disableKeyboardShortcuts(), } }, @@ -144,6 +145,10 @@ export default { }, onKeyDown(event) { + if (this.shortcutsDisabled) { + return + } + // If opened and escape pressed, close if (event.key === 'Escape' && this.opened) { event.preventDefault() |