mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Fix keybinds not working at all
This commit is contained in:
@@ -2523,9 +2523,10 @@ function addHotkeyListener(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hotkeyListener(e: KeyboardEvent): void {
|
function hotkeyListener(e: KeyboardEvent): void {
|
||||||
if (["textarea", "input"].includes(document.activeElement?.tagName?.toLowerCase())
|
if ((["textarea", "input"].includes(document.activeElement?.tagName?.toLowerCase())
|
||||||
|| document.activeElement?.["contentEditable"]
|
|| document.activeElement?.["contentEditable"] === "true"
|
||||||
|| document.activeElement?.id?.toLowerCase()?.match(/editable|input/)) return;
|
|| document.activeElement?.id?.toLowerCase()?.match(/editable|input/))
|
||||||
|
&& document.hasFocus()) return;
|
||||||
|
|
||||||
const key: Keybind = {
|
const key: Keybind = {
|
||||||
key: e.key,
|
key: e.key,
|
||||||
|
|||||||
Reference in New Issue
Block a user