Improve content editable check

This commit is contained in:
Ajay
2024-09-27 16:12:35 -04:00
parent e4b05a316a
commit 3bddd0405c

View File

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