Handles focusin events for the menu.
(event?: FocusEvent)
| 334 | |
| 335 | /** Handles focusin events for the menu. */ |
| 336 | onFocusIn(event?: FocusEvent) { |
| 337 | this.isFocused.set(true); |
| 338 | this.hasBeenInteracted.set(true); |
| 339 | |
| 340 | const item = event && _getMenuItem(event, this.inputs.items()); |
| 341 | const prevItem = this.inputs.activeItem(); |
| 342 | this.listBehavior.sync(item); |
| 343 | if (prevItem && prevItem !== this.inputs.activeItem()) { |
| 344 | prevItem.close(); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | /** Handles the focusout event for the menu. */ |
| 349 | onFocusOut(event: FocusEvent) { |
no test coverage detected