Skip to content

bug(mat-selection-list): command + A does not work as a select all. #24781

Closed
@Brutusn

Description

@Brutusn

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Inside the mat-selection-list you have the option to use ctrl + A. It will select all items in the list. For MacOs it won't work, it uses the 'metaKey'.

I looked into the code and I think it needs to be added here, just don't know how to do it.

hasModifierKey(event, 'ctrlKey') &&

Reproduction

Steps to reproduce:

  1. Use mac os
  2. Checkout: https://stackblitz.com/run?file=src/app/list-selection-example.ts (basic example)
  3. Press command + A

Expected Behavior

I expect all items to be selected.

Actual Behavior

All text is selected but not the items itself.

Environment

  • Angular: 13.x.x
  • CDK/Material: 13.3.3
  • Browser(s): all.
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/list

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions