Handles focusin events for the menu bar.
(event?: FocusEvent)
| 593 | |
| 594 | /** Handles focusin events for the menu bar. */ |
| 595 | onFocusIn(event?: FocusEvent) { |
| 596 | this.isFocused.set(true); |
| 597 | this.hasBeenInteracted.set(true); |
| 598 | |
| 599 | const item = event && _getMenuItem(event, this.inputs.items()); |
| 600 | const prevItem = this.inputs.activeItem(); |
| 601 | this.listBehavior.sync(item); |
| 602 | if (prevItem?.expanded() && prevItem !== this.inputs.activeItem()) { |
| 603 | prevItem.close(); |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | /** Handles focusout events for the menu bar. */ |
| 608 | onFocusOut(event: FocusEvent) { |
nothing calls this directly
no test coverage detected