bug(cdk/menu): sub menu with disabled items only is not closed when other sub menu is opened
- 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
This issue only occurs when using the menu with a keyboard.
If in a cdk menu, a sub menu is opened with ONLY disabled children, and then another sub menu is opened, that sub menu with the disabled children remains open.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-stnsdh?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:
1. focus "Open Menu" button
2. press space / open menu
3. navigate to menu item "With disabled child" using arrow keys
4. open sub menu by pressing arrow right
5. navigate to "With enabled child" by pressing arrow up
6. open sub menu by pressing arrow right
### Expected Behavior
Sub menu with disabled child is closed
### Actual Behavior
Sub menu with disabled child is NOT closed
### Environment
- Angular: 15
- CDK/Material: 15
- Browser(s): Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz y rastrea el comportamiento de navegación por teclado del menú de Angular CDK para los submenús que solo contienen elementos secundarios deshabilitados. Verifica la secuencia en Firefox sobre Ubuntu y confirma después que abrir el segundo submenú cierra el primero, conservando el comportamiento esperado del teclado.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 50/100