angular / angular/components

bug(form-field): mat-form-field text overlap with suffix icon

Open
#31,108 2 comments 0 reactions 0 assignees View on GitHub
P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

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

_No response_

### Description

when having mat-form-field with long label text the text overlap with suffix icon

### Reproduction

StackBlitz link: [https://stackblitz.com/edit/sktdb4nx-laqmu1py?file=src%2Fexample%2Fform-field-appearance-example.html](https://stackblitz.com/edit/sktdb4nx-laqmu1py?file=src%2Fexample%2Fform-field-appearance-example.html)
Steps to reproduce:
1. just put a long text on a mat-form-field with suffix icon

### Expected Behavior

no overlap with long text

### Actual Behavior

![Image](https://github.com/user-attachments/assets/66ac2d5e-3aba-464e-ab13-129f0245a903)

the text overlaps with the icon

### Environment

- Angular: 19.2.15
- CDK/Material: 19.2.15
- Browser(s): chrome
- Operating System (e.g. Windows, macOS, Ubuntu): windows

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz entry point, src/example/form-field-appearance-example.html, and reproduce the overlap using a long mat-form-field label with a suffix icon in Chrome. Trace the related Angular Material form-field behavior and verify that the long text no longer overlaps the icon.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.