From 2e62ddcbc5745ed68298dd572de3b7c1b4dc51f4 Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Fri, 17 May 2024 16:04:10 -0400 Subject: Properly check if modifiers are present (#959) --- ext/js/input/hotkey-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: []}; -- cgit v1.2.3