* wip * wip * wip * format * wip(mobile): lint and format * cleanup * nits * nits * idiomatic react * nit * format all root files
10 lines
256 B
TypeScript
10 lines
256 B
TypeScript
export function isTypingTarget(e: KeyboardEvent): boolean {
|
|
const target = e.target as HTMLElement | null;
|
|
if (!target) return false;
|
|
return (
|
|
target.tagName === 'INPUT' ||
|
|
target.tagName === 'TEXTAREA' ||
|
|
target.isContentEditable
|
|
);
|
|
}
|