angular / angular/components

bug(MatSelect): When navigating with keyboard, sometimes the first press of the down arrow is "ignored"

オープン
#21,677 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る
area: material/select needs: discussion P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Reproduction

The value of the first `MatOption` in a `MatSelect` must be `null`. Example:
```

-- // <------- Here
Dog
Cat

```

- https://stackblitz.com/edit/angular-lyemh3?file=src%2Fapp%2Fselect-hint-error-example.html

Steps to reproduce:
1. Refresh development server
2. Tab to the `MatSelect`
2. Use the down arrow to make a selection
3. Notice that the very first press appears to be ignored

#### Expected Behavior

The first press of the arrow should select `Dog`.

#### Actual Behavior

The first press of the arrow appears to do nothing.

#### Environment

- Angular: 11.0.6
- CDK/Material: 11.0.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、最初の MatOption が null value を持つ MatSelect を使って、リンク先の StackBlitz で動作を再現し、次に MatSelect のキーボードナビゲーションの経路を追跡します。完了条件は、Down Arrow を最初に押したときに無視されたように見えるのではなく Dog が選択され、このケースをカバーする回帰テストがあることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。