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

Method onFocusOut

src/aria/private/menu/menu.ts:608–615  ·  view source on GitHub ↗

Handles focusout events for the menu bar.

(event: FocusEvent)

Source from the content-addressed store, hash-verified

606
607 /** Handles focusout events for the menu bar. */
608 onFocusOut(event: FocusEvent) {
609 const relatedTarget = event.relatedTarget as Node | null;
610
611 if (!this.inputs.element()?.contains(relatedTarget)) {
612 this.isFocused.set(false);
613 this.close();
614 }
615 }
616
617 /** Goes to and optionally focuses the specified menu item. */
618 goto(item: MenuItemPattern<V>, opts?: {focusElement?: boolean}) {

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
setMethod · 0.80
elementMethod · 0.45

Tested by

no test coverage detected