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

Function onFocusIn

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

Source from the content-addressed store, hash-verified

174 };
175
176 let onFocusIn: EventListener = e => {
177 if (isFocusMovingToTarget(getEventTarget(e) as Element) || isRefocusing) {
178 e.stopImmediatePropagation();
179
180 if (!isRefocusing) {
181 isRefocusing = true;
182 focusWithoutScrolling(activeElement);
183 cleanup();
184 }
185 }
186 };
187
188 root.addEventListener('blur', onBlur, true);
189 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