MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onBlur

Function onBlur

packages/react-aria/src/selection/useSelectableCollection.ts:520–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518 };
519
520 let onBlur = e => {
521 // Don't set blurred and then focused again if moving focus within the collection.
522 if (!nodeContains(e.currentTarget, e.relatedTarget as HTMLElement)) {
523 manager.setFocused(false);
524 }
525 };
526
527 // Ref to track whether the first item in the collection should be automatically focused. Specifically used for autocomplete when user types
528 // to focus the first key AFTER the collection updates.

Callers

nothing calls this directly

Calls 2

nodeContainsFunction · 0.90
setFocusedMethod · 0.65

Tested by

no test coverage detected