Closed
Description
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
14.x.x
Description
Since v15, It becomes very difficult to select the text of the matListItemLine
just next to a matListItemTitle
.
The title overlaps the lines (at least the first)
It's due to the margin-bottom: -20px;
css property on .mdc-list-item--with-two-lines .mdc-list-item__primary-text, .mdc-list-item--with-three-lines .mdc-list-item__primary-text
and the ::after
/::before
use.
Reproduction
Steps to reproduce:
- Go to https://material.angular.io/components/list/examples
- Scroll to the example "List variants"
- Try to double click on a mat list item line (see that the text is well selected)
- Click on the Stackblitz link of this example
- Try to double click on a mat list item line (see that the title is selected instead of the line text)
Expected Behavior
Same behavior on the doc website
Which seems to have been handled with this CSS code :
.mat-mdc-list-base .mdc-list-item__start,
.mat-mdc-list-base .mdc-list-item__end,
.mat-mdc-list-base .mdc-list-item__content {
pointer-events: auto;
}
Of course we could add it by ourself on each project but I guess the actual behavior is more a bug than wanted
Actual Behavior
The title is selected instead of the line text
Environment
- Angular: 15.0.1
- CDK/Material: 15.0.0
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any