bug(MatSelect): When navigating with keyboard, sometimes the first press of the down arrow is "ignored"
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il comportamento nello StackBlitz collegato con un MatSelect la cui prima MatOption ha una null value, quindi traccia il percorso di navigazione da tastiera di MatSelect. Il lavoro è completato quando la prima pressione di Down Arrow seleziona Dog invece di sembrare ignorata, con un test di regressione che copra questo caso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100