UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

12 lines (11 loc) 455 B
/** * Checks whether the currently focused element is an editable form control * (`INPUT`, `TEXTAREA`, `SELECT`) or has `contentEditable` set. * * Useful for keyboard shortcut systems to avoid intercepting normal text input. * * @param doc - The document to check. Defaults to `document` in browser environments. * @returns `true` if an input-like element is focused. * @public */ export declare function isInputFocused(doc?: Document): boolean;