Skip to content

bug([MatChipInput]): when AddOnBlur + select option by click will add 2 chips #19279

Closed
@keatkeat87

Description

@keatkeat87

Reproduction

https://stackblitz.com/edit/angular-rd38q1?file=src/app/chips-autocomplete-example.html

Steps to reproduce:
dada

Expected Behavior

only the option will become chip

Actual Behavior

the text also become chip

remark:
I think this is because of the input blur event is fire before option click event.
if use keyboard up down enter, then everything work fine.
dada

Environment

Angular CLI: 9.1.4
Node: 12.16.1
OS: win32 x64

Angular: 9.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.4
@angular-devkit/build-angular 0.901.4
@angular-devkit/build-ng-packagr 0.901.4
@angular-devkit/build-optimizer 0.901.4
@angular-devkit/build-webpack 0.901.4
@angular-devkit/core 9.1.4
@angular-devkit/schematics 9.1.4
@angular/cdk 9.2.1
@angular/material 9.2.1
@angular/material-moment-adapter 9.2.1
@ngtools/webpack 9.1.4
@schematics/angular 9.1.4
@schematics/update 0.901.4
ng-packagr 9.0.0
rxjs 6.5.5
typescript 3.7.5
webpack 4.42.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions