angular / angular/components

bug(CdkMenu): Using keyboard and mouse to open sub-menus will not close previous sub menus and will crash the browser

Abierto
#28,862 3 comentarios 1 reacción 0 asignados Ver en GitHub
area: cdk/menu P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Mixing keyboard navigation and mouse to open nested menus opens multiple nested menus (without closing previous ones) and eventually crashes the browser.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-vcre5b?file=src%2Fmain.ts
Steps to reproduce:
1. click the menu trigger button to open the first menu
2. hover with the mouse on the first menu item to open a sub-menu
3. press the down key (will highlight the 2nd menu item) and then "right" key to open the second sub-menu

To crash the browser:
4. hover the mouse on the first sub-menu that is open

### Expected Behavior

The first sub-menu will close once a 2nd one is opened.

### Actual Behavior

First sub-menu remains open when the 2nd one appears on top

### Environment

- Angular: 17.2
- CDK/Material: 17.2
- Browser(s): Chrome/Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz e inspecciona el comportamiento de navegación con teclado y ratón de CdkMenu descrito en los pasos 1–4. Confirma que al abrir el segundo submenú se cierra el primero y que al pasar el cursor sobre el submenú abierto Chrome o Edge ya no se bloquea; el informe no menciona archivos ni pruebas del repositorio.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.