components icon indicating copy to clipboard operation
components copied to clipboard

bug(chip-list): Input `selectable` not working.

Open infacto opened this issue 3 years ago • 2 comments

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

idk

Description

When setting selectable to mat-chip-list, you can still select mat-chip. The selectable attr on mat-chip itself does also not work.

chip-select

Reproduction

See demo.

Expected Behavior

When <mat-chip-list [selectable]="false"><mat-chip></mat-chip></mat-chip-list> then mat-chip should not be selectable.

Actual Behavior

You can still select.

Environment

  • Angular: v14.2.11
  • CDK/Material: v14.2.7
  • Browser(s): Chrome 07.0.5304.107
  • Operating System; Windows 10

Some background: The annoying thing is, that when you have this in an input and click on the form-field, it always selects the first chip. It's a very bad UX and makes it impossible to scroll through chips. Because it always scrolls back to the first pos. Anyway, selectable should work.

infacto avatar Nov 17 '22 18:11 infacto

Your gif is showing the focus indication, not the selection indication which is a colored background.

crisbeto avatar Nov 17 '22 19:11 crisbeto

Ok, then feature request for an option to disable focusable chips?

infacto avatar Nov 18 '22 14:11 infacto

Focus indication is required for accessibility and we generally don't put in options to disable accessibility features. You can disable it in your own app with the following style override:

.mat-mdc-chip-focus-overlay {
  display: none;
}

crisbeto avatar Nov 28 '22 10:11 crisbeto

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.