Skip to content

Commit

Permalink
Improve content editable check
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Sep 27, 2024
1 parent e4b05a3 commit 3bddd04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,7 @@ function addHotkeyListener(): void {

function hotkeyListener(e: KeyboardEvent): void {
if ((["textarea", "input"].includes(document.activeElement?.tagName?.toLowerCase())
|| document.activeElement?.["contentEditable"] === "true"
|| (document.activeElement as HTMLElement)?.isContentEditable
|| document.activeElement?.id?.toLowerCase()?.match(/editable|input/))
&& document.hasFocus()) return;

Expand Down

0 comments on commit 3bddd04

Please sign in to comment.