summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-05-17 16:04:10 -0400
committerGitHub <noreply@github.com>2024-05-17 20:04:10 +0000
commit2e62ddcbc5745ed68298dd572de3b7c1b4dc51f4 (patch)
tree3074f4caf0916897f156cbdd1fadcfe1e277a635 /ext/js
parente19204b1ec26a1add25ae47903184dea8e705a33 (diff)
Properly check if modifiers are present (#959)
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/input/hotkey-handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/input/hotkey-handler.js b/ext/js/input/hotkey-handler.js
index cb95b805..601a87c9 100644
--- a/ext/js/input/hotkey-handler.js
+++ b/ext/js/input/hotkey-handler.js
@@ -232,7 +232,7 @@ export class HotkeyHandler extends EventDispatcher {
this._hotkeys.clear();
for (const [scope, registrations] of this._hotkeyRegistrations.entries()) {
for (const {action, argument, key, modifiers, scopes, enabled} of registrations) {
- if (!(enabled && (key !== null || modifiers !== null) && action !== '' && scopes.includes(scope))) { continue; }
+ if (!(enabled && (key !== null || modifiers.length > 0) && action !== '' && scopes.includes(scope))) { continue; }
let hotkeyInfo = this._hotkeys.get(key);
if (typeof hotkeyInfo === 'undefined') {
hotkeyInfo = {handlers: []};