]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/shortcuts.js
Framework: Addressed deprecations
[bookstack] / resources / js / components / shortcuts.js
index 85a7c3da711a1bf6bedca3760c69065982eefcaf..b22c467318e73f383259119d5b96126b8e39c98f 100644 (file)
@@ -29,17 +29,16 @@ export class Shortcuts extends Component {
                 return;
             }
 
-            this.handleShortcutPress(event);
-        });
-
-        window.addEventListener('keydown', event => {
             if (event.key === '?') {
                 if (this.hintsShowing) {
                     this.hideHints();
                 } else {
                     this.showHints();
                 }
+                return;
             }
+
+            this.handleShortcutPress(event);
         });
     }