Skip to content

bug(mat-form-field): Label position is wrong (appearance="outline") when mat-form-field is placed inside drawer #26332

Open
@atcen

Description

@atcen

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

Description

If the mat-form-field is empty and not focused, then the label moves behind the icon. the error only occurs with appearance="outline" and within a drawer that is not open by default

Reproduction

Steps to reproduce:

  1. place mat-form-field with appearance="outline" inside drawer
  2. place icon inside fat-form-field with matPrefix

Demo
https://stackblitz.com/edit/angular-ivy-qb7mbe?file=src/app/app.component.ts

Expected Behavior

old behaviour

Actual Behavior

image

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: material/form-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions