aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-09-27 15:50:10 -0400
committerAjay <[email protected]>2024-09-27 15:50:10 -0400
commit451ceb370b2719b54f64deff75fa3693e3122ac6 (patch)
treedb23106b308def7f97aca9ab37510c3a14a6bf19
parentab5291702a35b18fbef01cb5bac3d30f16cafaa7 (diff)
downloadSponsorBlock-451ceb370b2719b54f64deff75fa3693e3122ac6.tar.gz
SponsorBlock-451ceb370b2719b54f64deff75fa3693e3122ac6.zip
Fix keybinds not working at all
-rw-r--r--src/content.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/content.ts b/src/content.ts
index c9f09c62..cce56c04 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,