bug(CdkMenu): Using keyboard and mouse to open sub-menus will not close previous sub menus and will crash the browser
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### 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
贡献指南
调研方向
从链接的 StackBlitz 重现开始,检查步骤 1–4 中描述的 CdkMenu 键盘和鼠标导航行为。确认打开第二个子菜单会关闭第一个子菜单,并且将鼠标悬停在已打开的子菜单上不再导致 Chrome 或 Edge 崩溃;报告未指出任何 repository 文件或测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100