Skip to content

Commit

Permalink
fix(material/chips): fixed focus trap
Browse files Browse the repository at this point in the history
fixed behavior to where if you can now navigate backwards with focus to get out of mat-grid

fixes b/290959510
  • Loading branch information
DBowen33 committed Jul 8, 2024
1 parent 1a8f109 commit 109cbfa
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 109cbfa

Please sign in to comment.