(ancestor: ScopeRef, scope: ScopeRef)
| 512 | } |
| 513 | |
| 514 | function isAncestorScope(ancestor: ScopeRef, scope: ScopeRef) { |
| 515 | let parent = focusScopeTree.getTreeNode(scope)?.parent; |
| 516 | while (parent) { |
| 517 | if (parent.scopeRef === ancestor) { |
| 518 | return true; |
| 519 | } |
| 520 | parent = parent.parent; |
| 521 | } |
| 522 | return false; |
| 523 | } |
| 524 | |
| 525 | function focusElement(element: FocusableElement | null, scroll = false) { |
| 526 | if (element != null && !scroll) { |
no test coverage detected