components icon indicating copy to clipboard operation
components copied to clipboard

bug(Chips): Selecting value from autocomplete by keyboard navigation causes both the search string and the selected option to be added

Open weirdwizardthomas opened this issue 1 year ago • 1 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Reproducible on this example.

Reproduction

StackBlitz link: https://stackblitz.com/edit/rd9usi?file=package.json Steps to reproduce:

  1. Type any input that is a substring of any item in the suggestion list
  2. Navigate to a suggestion with keyboard
  3. Press Enter
  4. Both the search string and the selected are added

Expected Behavior

Only the selected suggestion is added

Actual Behavior

Both the selected and the suggested values are added

Environment

  • Angular: 16.2.6
  • CDK/Material: 16.2.8
  • Browser(s): Google Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): darwin arm64

weirdwizardthomas avatar Apr 10 '24 11:04 weirdwizardthomas

It's very basic scenario which I also hit right after I started exploring mat-chips. @angular-team When is it planned to incorporate the fix? With such a bug it's practically unusable.

marrhub avatar Aug 10 '24 18:08 marrhub