(scopeRef: ScopeRef)
| 610 | } |
| 611 | |
| 612 | function shouldRestoreFocus(scopeRef: ScopeRef) { |
| 613 | let scope = focusScopeTree.getTreeNode(activeScope); |
| 614 | while (scope && scope.scopeRef !== scopeRef) { |
| 615 | if (scope.nodeToRestore) { |
| 616 | return false; |
| 617 | } |
| 618 | |
| 619 | scope = scope.parent; |
| 620 | } |
| 621 | |
| 622 | return scope?.scopeRef === scopeRef; |
| 623 | } |
| 624 | |
| 625 | function useRestoreFocus( |
| 626 | scopeRef: RefObject<Element[] | null>, |
no test coverage detected