Skip to content

Commit f93d297

Browse files
committed
fix(chip-list): set key manager active index to -1 when blurred
1 parent c224300 commit f93d297

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/chips/chip-list.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,6 @@ export class MatChipList extends _MatChipListMixinBase implements MatFormFieldCo
570570
if (correspondingChip) {
571571
if (isUserInput) {
572572
this._keyManager.setActiveItem(correspondingChip);
573-
} else {
574-
this._keyManager.updateActiveItem(correspondingChip);
575573
}
576574
}
577575
}
@@ -655,6 +653,7 @@ export class MatChipList extends _MatChipListMixinBase implements MatFormFieldCo
655653

656654
/** When blurred, mark the field as touched when focus moved outside the chip list. */
657655
_blur() {
656+
this._keyManager.setActiveItem(-1);
658657
if (!this.disabled) {
659658
if (this._chipInput) {
660659
// If there's a chip input, we should check whether the focus moved to chip input.

0 commit comments

Comments
 (0)