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

Method _forwardArrowPressed

src/cdk/menu/menu-item.ts:272–280  ·  view source on GitHub ↗

* Handles the user pressing the forward arrow key. * @param event The keyboard event.

(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

270 * @param event The keyboard event.
271 */
272 private _forwardArrowPressed(event: KeyboardEvent) {
273 if (!this.hasMenu && this._menuStack.inlineMenuOrientation() === 'horizontal') {
274 event.preventDefault();
275 this._menuStack.closeAll({
276 focusNextOnEmpty: FocusNext.nextItem,
277 focusParentTrigger: true,
278 });
279 }
280 }
281
282 /**
283 * Subscribe to the mouseenter events and close any sibling menu items if this element is moused

Callers 1

_onKeydownMethod · 0.95

Calls 2

inlineMenuOrientationMethod · 0.80
closeAllMethod · 0.45

Tested by

no test coverage detected