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

Function onFocusIn

packages/react-aria/src/interactions/utils.ts:182–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 };
181
182 let onFocusIn: EventListener = e => {
183 if (isFocusMovingToTarget(getEventTarget(e) as Element) || isRefocusing) {
184 e.stopImmediatePropagation();
185
186 if (!isRefocusing) {
187 isRefocusing = true;
188 focusWithoutScrolling(activeElement);
189 cleanup();
190 }
191 }
192 };
193
194 root.addEventListener('blur', onBlur, true);
195 root.addEventListener('focusout', onFocusOut, true);

Callers

nothing calls this directly

Calls 4

getEventTargetFunction · 0.90
focusWithoutScrollingFunction · 0.90
isFocusMovingToTargetFunction · 0.85
cleanupFunction · 0.85

Tested by

no test coverage detected