angular / angular/components

Autocomplete stops showing the List when clicking in the input field after adding a Mat-Chip

Aperta
#17,292 12 commenti 6 reazioni 0 assegnatari Vedi su GitHub
area: material/chips P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Reproduction

Use StackBlitz to reproduce your issue:
Official Demo shows this issue.
https://run.stackblitz.com/api/angular/v1?file=app%2Fchips-autocomplete-example.ts

This example starts showing a Lemon in the autocomplete component.

Steps to reproduce:
1. Click in the Input of Autocomplete, next to the Lemon matchip
2. It properly shows the List associated
3. Click in an Option of the List, i.e "Apple". The mat-chip is added next to "Lemon".
4. Click in the Input of Autocomplete. Now it does not show the "List", as you would expect and as it did in step 2, which breaks the UIX.
5. Click outside the component (it loses the Focus)
6. Click again the Input field: it receives the Focus and the List is again shown.

#### Expected Behavior

What behavior were you expecting to see?
Users expect that clicking in the Input field would show them the List of options again, as it did in the very beginning without needing to use the "hackish" click out-and-in.

#### Actual Behavior

What behavior did you actually see?
If a Mat-chip is added, the user needs to focus out and then click to set the Focus in, in order to have the List shown.

#### Environment

- Angular: 8.1.0
- CDK/Material: Material 8.0.2
- Browser(s): Chrome, Safari, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows, Ubuntu, MacOS

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata e segui i passaggi elencati nell'esempio di autocomplete e mat-chip. Esamina il comportamento del focus e della selezione delle opzioni dopo l'aggiunta di un chip; è completato quando facendo clic sul campo di input viene mostrato immediatamente di nuovo l'elenco delle opzioni, senza dover prima perdere e ripristinare il focus.

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
Specificata chiaramente
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.