Fix keybinds not working at all

This commit is contained in:
Ajay
2024-09-27 15:50:10 -04:00
parent ab5291702a
commit 451ceb370b

View File

@@ -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,