mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 19:00:12 +01:00
Always handle the escape key when shortcuts are enabled
This commit is contained in:
parent
f1d8220ab7
commit
cf75623184
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue