bug(CdkMenu): Using keyboard and mouse to open sub-menus will not close previous sub menus and will crash the browser
- 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
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
Beitragsleitfaden
Rechercherichtung
Beginne mit der verlinkten StackBlitz-Reproduktion und untersuche das in den Schritten 1–4 beschriebene Tastatur- und Mausnavigationsverhalten von CdkMenu. Bestätige, dass beim Öffnen des zweiten Untermenüs das erste geschlossen wird und dass das Bewegen des Mauszeigers über das geöffnete Untermenü Chrome oder Edge nicht mehr zum Absturz bringt; im Bericht werden keine Repository-Dateien oder Tests genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100