aboutsummaryrefslogtreecommitdiff
path: root/ui/static/js/keyboard_handler.js
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2018-10-22 20:26:17 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net> 2018-10-22 20:26:17 -0700
commitf06a19814bde280277d7e7309d83a4ac538840f2 (patch)
tree3bf4e6712873c0f38a45ca240fd937a87e5ec281 /ui/static/js/keyboard_handler.js
parent86dc2bf1c9547f92d717456d4b059bcae1c3e3d2 (diff)
downloadv2-f06a19814bde280277d7e7309d83a4ac538840f2.tar.gz
v2-f06a19814bde280277d7e7309d83a4ac538840f2.tar.zst
v2-f06a19814bde280277d7e7309d83a4ac538840f2.zip
Revert "Call preventDefault() when a keyboard shortcut is executed"
This reverts commit 9440bf47a521a61c91073425bd613710cf7dd1cb.
Diffstat (limited to 'ui/static/js/keyboard_handler.js')
-rw-r--r--ui/static/js/keyboard_handler.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/ui/static/js/keyboard_handler.js b/ui/static/js/keyboard_handler.js
index e30b0ddc..df6eefc9 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";
}