mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 15:07:02 +03:00
Improve content editable check
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user