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

Function onFocusIn

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

Source from the content-addressed store, hash-verified

159 };
160
161 let onFocusIn = (e: FocusEvent) => {
162 if (getEventTarget(e) === target || isRefocusing) {
163 e.stopImmediatePropagation();
164
165 if (!isRefocusing) {
166 isRefocusing = true;
167 focusWithoutScrolling(activeElement);
168 cleanup();
169 }
170 }
171 };
172
173 window.addEventListener('blur', onBlur, true);
174 window.addEventListener('focusout', onFocusOut, true);

Callers

nothing calls this directly

Calls 3

getEventTargetFunction · 0.90
focusWithoutScrollingFunction · 0.90
cleanupFunction · 0.85

Tested by

no test coverage detected