example export function isTextField ( element ) { try { const isTextInput = element instanceof HTMLInputElement && element . selectionStart !== null ; const isTextArea = element . tagName === "TEXTAREA" ; const isContentEditable = element . contentEditable === "true" ; return isTextInput || isTextArea || isContentEditable || false ; } catch ( error ) { return false ; } }