MCPcopy Create free account
hub / github.com/angular/components / onFocusIn

Method onFocusIn

src/aria/private/menu/menu.ts:336–346  ·  view source on GitHub ↗

Handles focusin events for the menu.

(event?: FocusEvent)

Source from the content-addressed store, hash-verified

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) {

Callers 1

menu.spec.tsFile · 0.45

Calls 5

_getMenuItemFunction · 0.85
setMethod · 0.80
activeItemMethod · 0.80
syncMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected