Skip to content

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

Open
@weirdwizardthomas

Description

@weirdwizardthomas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/chips

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions