bug(MatSelect): When navigating with keyboard, sometimes the first press of the down arrow is "ignored"
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### 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
Beitragsleitfaden
Rechercherichtung
Beginne damit, das Verhalten im verknüpften StackBlitz mit einer MatSelect zu reproduzieren, deren erste MatOption einen null value hat, und verfolge anschließend den Pfad der Tastaturnavigation von MatSelect. Als erledigt gilt die Aufgabe, wenn der erste Druck auf den Down Arrow Dog auswählt, anstatt scheinbar ignoriert zu werden, und ein Regressionstest diesen Fall abdeckt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100