bug(MatMenu): Menu item with menuTrigger combine with menu item in sub component does not clos sub menu
- 主要言語
- 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

A mat-menu, using a `mat-menu-item` with a `matMenuTriggerFor` next to a menu-item in a sub component does not properly closes sub menu and handle highlighted item on mouse over.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/x3u2hh?file=src%2Fexample%2Fmenu-nested-example.html
Steps to reproduce:
1. Open menu by clicking _Animal index_ button
2. Mouse Over _Vertebrates_ menu, the sub menu opens
3. Mouse Over _Menu item component_
### Expected Behavior
The Vertebrates sub menu should close and Vertebrates menu should no longer be highlighted
only menu-item _Menu item component_ should be highlighted
### Actual Behavior
The Vertebrates sub menu is still open and Vertebrates menu is still highlighted along with _Menu item component_
### Environment
- Angular: 16.1
- CDK/Material: 16.2.9
- Browser(s): chrome / Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現例、特に src/example/menu-nested-example.html から始め、ネストされた mat-menu の hover シーケンスを再現します。menu-item と matMenuTriggerFor のインタラクションを追跡し、親がハイライトされたまま開いている理由を特定します。Vertebrates サブメニューが閉じ、Menu item component のみがハイライトされた状態になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100