* Toggles focus between the table row's root and the last focused nested element. * @private
(e: CustomEvent<TableRowF7PressEventDetail>)
| 759 | * @private |
| 760 | */ |
| 761 | _handleF7(e: CustomEvent<TableRowF7PressEventDetail>) { |
| 762 | const row = e.detail.row; |
| 763 | row.tabbableElements = getTabbableElements(row); |
| 764 | const activeElement = getActiveElement(); |
| 765 | const lastFocusedElement = row.tabbableElements[this._prevNestedElementIndex] || row.tabbableElements[0]; |
| 766 | const targetIndex = row.tabbableElements.indexOf(activeElement as HTMLElement); |
| 767 | |
| 768 | if (!row.tabbableElements.length) { |
| 769 | return; |
| 770 | } |
| 771 | |
| 772 | if (activeElement === row.root) { |
| 773 | lastFocusedElement.focus(); |
| 774 | } else if (targetIndex > -1) { |
| 775 | this._prevNestedElementIndex = targetIndex; |
| 776 | row.root.focus(); |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | _onfocusin(e: FocusEvent) { |
| 781 | const target = getNormalizedTarget(e.target as HTMLElement); |
nothing calls this directly
no test coverage detected