angular / angular/components

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

Ouverte
#26,332 4 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
area: material/form-field P2
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### Is this a regression?

- [X] 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](https://user-images.githubusercontent.com/1451287/209673027-d7c82a0f-757f-44ce-9a5c-a1855ad598b4.png)

### Environment

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et vérifiez le mat-form-field vide et non focalisé à l’intérieur d’un drawer initialement fermé, utilisant outline appearance et une icône matPrefix. Lisez le comportement pertinent de form-field et drawer dans Angular Material concernant le positionnement du libellé. La tâche est terminée lorsque le libellé ne se déplace plus derrière l’icône et que la reproduction correspond au comportement précédent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.