bug(MatSelect): When panel is displayed inside a SideNav, it stays opened on Escape button
- 主要言語
- 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
Hi,
When using MatSelect inside a SideNav, if the panel is opened and we close the sideNav with the Escape button, the MatSelect panel stays opened.
I expected the same behavior like with the MatDatePicker, if the picker panel is opened, when using Escape the picker is closed first, and then using Escape again closes the sideNav.
I also provide the same sample inside a Dialog using the MatSelect and MatDatePicker and in this case, both works the same way and correctly.
The issue seems related to this one:
https://github.com/angular/components/issues/7981
Thanks
### Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-starter-r9az1u4q
Steps to reproduce:
1. Click on button to open the SideNav
2. Open the MatSelect panel
3. Click on Escape
### Expected Behavior
MatSelect should be closed with the escape button instead of the SideNav
### Actual Behavior
SideNav is closed and MatSelect panel stays visible
### Environment
- Angular: 18 (same issue in 19)
- CDK/Material: 18 (same issue in 19)
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現から始め、SideNav、MatSelect、MatDatePicker の例で Escape シーケンスを再現します。MatSelect が Escape をどのように処理するかを、picker の動作と比較します。完了条件は、最初に MatSelect パネルが閉じ、その後の Escape で SideNav が閉じることです。報告された setup もカバーしてください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100