Skip to content

bug(mat-label): mat-label overlap control and does not show ellipsis #26337

Open
@Flo0806

Description

@Flo0806

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

I'm not 100% sure, but it worked before

Description

The mat-label does not wrap the text with ellipsis anymore in the mat-datepicker. Instead the text goes over the icon/control itself.
image

<mat-form-field style="width: 200px;">
  <mat-label>To long to show all text</mat-label>
  <input
    matInput
    [matDatepicker]="dateLoan"
    readonly
    formControlName="dateFinalPaymentControl"
  />
  <mat-datepicker-toggle matSuffix [for]="dateLoan"></mat-datepicker-toggle>
  <mat-datepicker #dateLoan></mat-datepicker>
</mat-form-field>

Reproduction

Steps to reproduce:

  1. Simple add create a mat-datepicker with a mat-label with new version 15.x

Stackblitz is available

Expected Behavior

Before the text was trimmed with ellipsis like this:

image

Actual Behavior

Now is go outside the control/over the icon:

image

Environment

  • Angular: 15.0.4
  • CDK/Material: 15.0.3
  • Browser(s): (Chrome, Edge, Firefox)
  • Operating System: 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/form-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions