Skip to content

bug(MatChipInput): On press Backspace button input value added to chips #23128

Closed
@akirpichnikov

Description

@akirpichnikov

Reproduction

Stackblitz with Angular 12.1.1 incorrect behavior: https://stackblitz.com/edit/angular-zb5iff?file=src/app/chips-input-example.html
Stackblitz with Angular 11.x.x and correct behavior: https://stackblitz.com/edit/angular-sehgsv?file=src/app/chips-input-example.html

Steps to reproduce:

  1. Click on any chip (or press add text button)
  2. Value added to input field and input focused
  3. Press Backspace button

User may press any other button like cursor keys, delete and after that backspace behave correctly.

Expected Behavior

Delete the last character in the input field

Actual Behavior

Chip immediately added to chips with the current value

Environment

  • Angular: 12.1.1
  • CDK/Material: 12.1.1
  • Browser(s): Chrome 91.0.4472.114, Firefox 89.0.2
  • Operating System (Windows 10, macOS 11.4):

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/chips

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions