Browse Source

Merge pull request #5636 from NadavTasher/bugfix/esc-keyboard-shortcut-not-working

Always handle the escape key when shortcuts are enabled
Lauri Ojansivu 5 months ago
parent
commit
133066c900
1 changed files with 4 additions and 0 deletions
  1. 4 0
      client/lib/keyboard.js

+ 4 - 0
client/lib/keyboard.js

@@ -23,6 +23,10 @@ Mousetrap.stopCallback = (e, element) => {
   if (!ReactiveCache.getCurrentUser().isKeyboardShortcuts())
     return true;
 
+  // Always handle escape
+  if (e.keyCode === 27)
+    return false;
+
   // Make sure there are no selected characters
   if (window.getSelection().type === "Range")
     return true;