From 451ceb370b2719b54f64deff75fa3693e3122ac6 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 27 Sep 2024 15:50:10 -0400 Subject: [PATCH] Fix keybinds not working at all --- src/content.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/content.ts b/src/content.ts index c9f09c623..cce56c041 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2523,9 +2523,10 @@ function addHotkeyListener(): void { } function hotkeyListener(e: KeyboardEvent): void { - if (["textarea", "input"].includes(document.activeElement?.tagName?.toLowerCase()) - || document.activeElement?.["contentEditable"] - || document.activeElement?.id?.toLowerCase()?.match(/editable|input/)) return; + if ((["textarea", "input"].includes(document.activeElement?.tagName?.toLowerCase()) + || document.activeElement?.["contentEditable"] === "true" + || document.activeElement?.id?.toLowerCase()?.match(/editable|input/)) + && document.hasFocus()) return; const key: Keybind = { key: e.key,