Closed
Description
Reproduction
Steps to reproduce:
- Create a new project with a
<mat-chip-list><mat-chip>Some text<mat-icon matChipRemove>cancel</mat-icon></mat-chip></mat-chip-list>
- Import bootstrap
- Start the application
Expected Behavior
I expect the close button to display properly, and I don't expect unrelated HTML attributes on the element.
Actual Behavior
The button displays with a square around it because matChipRemove
directive applies a type="button"
on the host element regardless of their tag name.
This renders a <mat-icon type="button">
which has no sense nor utility, and it displays with a square around it, because of this bootstrap CSS rule:
[type=button], [type=reset], [type=submit], button {
-webkit-appearance: button;
}
Environment
- Angular: 9
- CDK/Material: 9
- Browser(s): Chrome 79
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Related pull request: #18095