summaryrefslogtreecommitdiffstats
path: root/core/src/components
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-09-14 16:46:24 +0200
committerJoas Schilling <coding@schilljs.com>2022-09-15 11:20:08 +0200
commit5267ea26241028cf193c0917f5ffd72adbba826f (patch)
tree4b0fdf921dd394469293927659bd4f4f31ac28f7 /core/src/components
parent7672152579447d1cc465a41d1b90004045236c29 (diff)
downloadnextcloud-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.vue5
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()