mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
Revert "Call preventDefault() when a keyboard shortcut is executed"
This reverts commit 9440bf47a5
.
This commit is contained in:
parent
86dc2bf1c9
commit
f06a19814b
4 changed files with 14 additions and 18 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue