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

Function shouldContainFocus

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

Source from the content-addressed store, hash-verified

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