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時間
- マージ済み PR(30日)
- 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 のキーボードおよびマウスナビゲーションの動作を調査してください。2 番目のサブメニューを開くと 1 番目のサブメニューが閉じること、また開いているサブメニューにマウスを合わせても Chrome や Edge がクラッシュしなくなったことを確認してください。この報告ではリポジトリのファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100