Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
weirdwizardthomas opened this issue Apr 10, 2024 · 0 comments · May be fixed by #28874
Labels
area: material/chips P4 A relatively minor issue that is not relevant to core functions

Comments

@weirdwizardthomas
Copy link

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 weirdwizardthomas added the needs triage This issue needs to be triaged by the team label Apr 10, 2024
@amysorto amysorto added Accessibility This issue is related to accessibility (a11y) P4 A relatively minor issue that is not relevant to core functions area: material/chips and removed needs triage This issue needs to be triaged by the team labels Apr 10, 2024
lsamboretrorabbit added a commit to lsamboretrorabbit/components that referenced this issue Apr 12, 2024
…ed and the suggested values added

Fixes a bug in the Angular Material `chips` component where the autocomplete input
has both the selected and the suggested values added.
The input should only take the suggested value

Fixes angular#28852
@zarend zarend removed the Accessibility This issue is related to accessibility (a11y) label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/chips P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
3 participants