bug(Autocomplete): Selected option is not deselected when first input is removed while panel is closed (without clicking on input field for focus)
- 主要言語
- 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
Selected option does not get deselected when the input is cleared (without clicking on input field for focus) while the panel is closed.
https://github.com/user-attachments/assets/3930b00b-7131-4b98-b29b-597b8883eb94
### Reproduction
StackBlitz link:
Steps to reproduce:
1. Click on autocomplete input field.
2. Select an option from the list.
3. Hit backspace from keyboard. (NOTE - don't click on the input to focus the field so that the panel remains closed while hitting backspace)
4. On first backspace - the selection (checkmark) remains on the previously selected option and the panel gets opened.
5. On second backspace - the selection gets cleared because panel was already open.
### Expected Behavior
The selection should get cleared since the input value has changed.
### Actual Behavior
The selection does not get cleared.
### Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
コントリビューションガイド
調査の方向性
まず、説明されている Angular のオートコンプリートのシーケンスを再現します。オプションを選択し、パネルを閉じたまま、入力欄に再度フォーカスせずに Backspace を押します。最初の入力変更が、選択されたオプションとパネルの状態をどのように処理するかを追跡します。パネルが閉じている状態で、最初の Backspace で選択が解除されれば完了です。issue ではファイルもテストも指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100