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

Function shouldContainFocus

packages/react-aria/src/focus/FocusScope.tsx:289–300  ·  view source on GitHub ↗
(scopeRef: ScopeRef)

Source from the content-addressed store, hash-verified

287}
288
289function shouldContainFocus(scopeRef: ScopeRef) {
290 let scope = focusScopeTree.getTreeNode(activeScope);
291 while (scope && scope.scopeRef !== scopeRef) {
292 if (scope.contain) {
293 return false;
294 }
295
296 scope = scope.parent;
297 }
298
299 return true;
300}
301
302function getRadiosInGroup(element: HTMLInputElement): HTMLInputElement[] {
303 if (!element.form) {

Callers 3

onKeyDownFunction · 0.85
onFocusFunction · 0.85
onBlurFunction · 0.85

Calls 1

getTreeNodeMethod · 0.80

Tested by

no test coverage detected