angular / angular/components

bug(MatFormField): layout glitch on long mat-error text

オープン
#27,982 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/form-field P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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

When having a long error text on a mat-form-field the text overlaps with any thing under the field.

![image](https://github.com/angular/components/assets/12666919/bdb6b3d7-4c38-4d69-8a66-85e40cbd42f1)

NOTE: This happens on outlined mat-form-field. For filled mat-form-field the text is cut and not fully shown. As picture below :

![image](https://github.com/angular/components/assets/12666919/f63046da-b399-4308-9053-819bbf299467)

### Reproduction

StackBlitz link: [https://stackblitz.com/run?file=src%2Fapp%2Fform-field-error-example.ts](https://stackblitz.com/run?file=src%2Fapp%2Fform-field-error-example.ts)
Steps to reproduce:
1. Put a long error text.
2. Put another input field under

### Expected Behavior

the error should be shown properly and not overlaps with the element on the bottom.

### Actual Behavior

The error text is is being hidden by text under the mat-form-field.

### Environment

- Angular: 16.2.10
- CDK/Material: 16.2.9
- Browser(s): Chrome Version 118.0.5993.88
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the linked StackBlitz reproduction in src/app/form-field-error-example.ts and verify the behavior with a long mat-error followed by another input. Compare outlined and filled mat-form-field layouts, then confirm that the full error remains visible without overlapping or being cut off.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。