MCPcopy Create free account
hub / github.com/FormidableLabs/use-editable / onKeyUp

Function onKeyUp

src/useEditable.ts:452–458  ·  view source on GitHub ↗
(event: HTMLElementEventMap['keyup'])

Source from the content-addressed store, hash-verified

450 };
451
452 const onKeyUp = (event: HTMLElementEventMap['keyup']) => {
453 if (event.defaultPrevented || event.isComposing) return;
454 if (!isUndoRedoKey(event)) trackState();
455 flushChanges();
456 // Chrome Quirk: The contenteditable may lose focus after the first edit or so
457 element.focus();
458 };
459
460 const onSelect = (event: Event) => {
461 // Chrome Quirk: The contenteditable may lose its selection immediately on first focus

Callers

nothing calls this directly

Calls 3

isUndoRedoKeyFunction · 0.85
trackStateFunction · 0.85
flushChangesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…