components
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
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:
- Type any input that is a substring of any item in the suggestion list
- Navigate to a suggestion with keyboard
- Press Enter
- 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
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.