Callback for when the focused state of a tab has changed.
(focusOrigin: FocusOrigin, index: number)
| 565 | |
| 566 | /** Callback for when the focused state of a tab has changed. */ |
| 567 | _tabFocusChanged(focusOrigin: FocusOrigin, index: number) { |
| 568 | // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which |
| 569 | // can cause the tab to be moved out from under the pointer, interrupting the |
| 570 | // click sequence (see #21898). We don't need to scroll the tab into view for |
| 571 | // such cases anyway, because it will be done when the tab becomes selected. |
| 572 | if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') { |
| 573 | this._tabHeader.focusIndex = index; |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | /** |
| 578 | * Callback invoked when the centered state of a tab body changes. |
nothing calls this directly
no outgoing calls
no test coverage detected