(target: EventTarget | null)
| 15 | ) |
| 16 | |
| 17 | const isTyping = (target: EventTarget | null) => |
| 18 | target instanceof HTMLElement && |
| 19 | (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName)) |
| 20 | |
| 21 | const focusableSelector = |
| 22 | "input, button:not([tabindex='-1']), a[href]:not([tabindex='-1'])" |