R
fn

isFocusedElementEditable

testeddemo

Decides whether the currently focused element already swallows text input (an `<input>`, `<textarea>`, or any `contenteditable` host). When it does we leave the keystroke alone so we never steal focus from a real text field.

Demo

Loading demo…

Signature

ts
export function isFocusedElementEditable(document: Document): boolean{ ... }

Parameters

ParameterTypeDescription
documentDocument

Returns

boolean