MCPcopy Index your code
hub / github.com/adobe/react-spectrum / onFocusOut

Function onFocusOut

packages/react-aria/src/interactions/utils.ts:141–153  ·  view source on GitHub ↗
(e: FocusEvent)

Source from the content-addressed store, hash-verified

139 };
140
141 let onFocusOut = (e: FocusEvent) => {
142 if (getEventTarget(e) === activeElement || isRefocusing) {
143 e.stopImmediatePropagation();
144
145 // If there was no focusable ancestor, we don't expect a focus event.
146 // Re-focus the original active element here.
147 if (!target && !isRefocusing) {
148 isRefocusing = true;
149 focusWithoutScrolling(activeElement);
150 cleanup();
151 }
152 }
153 };
154
155 let onFocus = (e: FocusEvent) => {
156 if (getEventTarget(e) === target || isRefocusing) {

Callers

nothing calls this directly

Calls 3

getEventTargetFunction · 0.90
focusWithoutScrollingFunction · 0.90
cleanupFunction · 0.85

Tested by

no test coverage detected