angular / angular/components

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

Offen
#17,292 12 Kommentare 6 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: material/chips P4
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verknüpften StackBlitz-Reproduktion und befolge die aufgeführten Schritte im Beispiel für autocomplete und mat-chip. Untersuche das Fokus- und die Optionen-Auswahlverhalten nach dem Hinzufügen eines Chips; fertig ist es, wenn ein Klick auf das Eingabefeld die Optionsliste sofort wieder anzeigt, ohne dass zuvor der Fokus verloren und wieder hergestellt werden muss.

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
Klar beschrieben
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.