Skip to content

Commit

Permalink
fix(material/chips): fix focus issue (angular#29427)
Browse files Browse the repository at this point in the history
fix focus issue

fixes b/290959510
  • Loading branch information
DBowen33 committed Jul 12, 2024
1 parent f509e53 commit e69b2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/chips/chip-grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export class MatChipGrid
// Delay until the next tick, because this can cause a "changed after checked"
// error if the input does something on focus (e.g. opens an autocomplete).
Promise.resolve().then(() => this._chipInput.focus());
} else if (this._chips.length) {
} else if (this._chips.length && this._keyManager.activeItemIndex !== 0) {
this._keyManager.setFirstItemActive();
}

Expand Down

0 comments on commit e69b2b0

Please sign in to comment.