2
0
Эх сурвалжийг харах

Always handle the escape key when shortcuts are enabled

Nadav Tasher 5 сар өмнө
parent
commit
cf75623184

+ 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;