Skip to content

Commit

Permalink
Fix keybinds not working at all
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Sep 27, 2024
1 parent ab52917 commit 451ceb3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 451ceb3

Please sign in to comment.