bug(CdkMenuItem): Main menu closes after clicking on a menu item that is a menu
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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
Clicking on a menu item that is also a menu will close the whole menu, instead of closing only the opened submenu.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/4aortd
Steps to reproduce:
1. Click on `File` button
2. Click on `New` menu item
### Expected Behavior
The submenu for the `New` menu item is closed (or kept open), the menu associated with `File` is kept open (like a `CdkMenuBar` or the menu nested example: https://material.angular.io/components/menu/examples#menu-nested)
### Actual Behavior
The submenu for the `New` menu item is closed and the `File` menu is closed as well.
### Environment
- Angular: 19.0.0
- CDK/Material: 19.0.0
- Browser(s): 131.0.6778.70 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Pro
Beitragsleitfaden
Rechercherichtung
Beginne mit der verlinkten StackBlitz-Reproduktion und folge der im Issue beschriebenen File > New-Interaktion. Verfolge das Schließverhalten von Menüeinträgen und Untermenüs in der Angular-CDK-Menüimplementierung und überprüfe anschließend, dass das Schließen von New File geöffnet lässt, wobei die Beispiele nested-menu und CdkMenuBar als Verhaltensreferenzen dienen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100