Fix ignoreTyping for focused element (#5150)

This commit is contained in:
the1812 2025-02-26 23:09:17 +08:00
parent ce19b659bc
commit 46c6d59350

View File

@ -49,7 +49,10 @@ export const loadKeyBindings = lodash.once((bindings: KeyBinding[]) => {
const hasElementFocus = !([document.body, null] as (Element | null)[]).includes(
getActiveElement(),
)
if (binding.action.ignoreFocus !== false && hasElementFocus) {
if (
(binding.action.ignoreFocus !== false || binding.action.ignoreTyping !== false) &&
hasElementFocus
) {
return
}