angular / angular/components

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

Ouverte
#17,292 12 commentaires 6 réactions 0 personnes assignées Voir sur GitHub
area: material/chips P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et suivez les étapes indiquées dans l’exemple d’autocomplete et de mat-chip. Examinez le comportement du focus et de la sélection des options après l’ajout d’un chip ; c’est terminé lorsque cliquer sur le champ de saisie affiche immédiatement la liste des options à nouveau, sans devoir d’abord perdre puis rétablir le focus.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.