diff options
Diffstat (limited to 'ui/static/js/keyboard_handler.js')
-rw-r--r-- | ui/static/js/keyboard_handler.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ui/static/js/keyboard_handler.js b/ui/static/js/keyboard_handler.js index e30b0dd..df6eefc 100644 --- a/ui/static/js/keyboard_handler.js +++ b/ui/static/js/keyboard_handler.js @@ -21,12 +21,14 @@ class KeyboardHandler { let keys = combination.split(" "); if (keys.every((value, index) => value === this.queue[index])) { - this.execute(combination, event); + this.queue = []; + this.shortcuts[combination](event); return; } if (keys.length === 1 && key === keys[0]) { - this.execute(combination, event); + this.queue = []; + this.shortcuts[combination](event); return; } } @@ -37,14 +39,6 @@ class KeyboardHandler { }; } - execute(combination, event) { - event.preventDefault(); - event.stopPropagation(); - - this.queue = []; - this.shortcuts[combination](event); - } - isEventIgnored(event) { return event.target.tagName === "INPUT" || event.target.tagName === "TEXTAREA"; } |