From 6336f6e572329f7434d538292b692cf5e7f3cabd Mon Sep 17 00:00:00 2001 From: Christian Bastian <80225746+cdb-boop@users.noreply.github.com> Date: Thu, 8 Aug 2024 20:42:34 -0400 Subject: [PATCH] Removed debug printing. - Attempted to fix Key Combo bug blocking 'S' key. --- web/model-manager.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/model-manager.js b/web/model-manager.js index 1230508..6cceeab 100644 --- a/web/model-manager.js +++ b/web/model-manager.js @@ -64,7 +64,6 @@ class KeyComboListener { const keyCodes = this.#keyCodes; const combo = this.#combo; if (keyCodes.includes(code) && !combo.includes(code)) { - console.log(`COMBO ADD: ${code}, COMBO:${combo}`); combo.push(code); } if (combo.length === 0 || keyCodes.length !== combo.length) { @@ -76,13 +75,12 @@ class KeyComboListener { } } if (document.activeElement !== this.element) { - console.log("not active"); return; } - console.log("SAVE"); e.preventDefault(); e.stopPropagation(); this.action(); + this.#combo.length = 0; }); document.addEventListener("keyup", (e) => { // Mac keyup doesn't fire when meta key is held: https://stackoverflow.com/a/73419500