Skip to content

Commit

Permalink
fix(material/list): add command+A for MacOs "select all" functionality.
Browse files Browse the repository at this point in the history
Fixes a bug in Angular Material `list` when using MacOs `command`+`a` does not work for 'select all functionality'.

Fixes angular#24781
  • Loading branch information
Egor Volvachev committed Apr 15, 2022
1 parent 4193037 commit 55ec801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/list/selection-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export class MatSelectionList
if (
keyCode === A &&
this.multiple &&
hasModifierKey(event, 'ctrlKey') &&
hasModifierKey(event, 'ctrlKey', 'metaKey') &&
!manager.isTyping()
) {
const shouldSelect = this.options.some(option => !option.disabled && !option.selected);
Expand Down

0 comments on commit 55ec801

Please sign in to comment.