bug(mat-form-field): mat-form-field appearance outline with mat-icon as matPrefix inside a mat-tab
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 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
13
### Description
If we have a `` containing a `` inside a `` that is not displayed initially, the label isn't positioned correctly.
### Reproduction
Steps to reproduce:
https://stackblitz.com/edit/angular-ivy-svduwe?file=src%2Fapp%2Fapp.component.html,angular.json,src%2Fstyles.scss,src%2Fapp%2Fapp.module.ts,src%2Findex.html
```
search
Outline form field
search
Outline form field
```
### Expected Behavior
The text should be aligned correctly after the icon
### Actual Behavior

### Environment
- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Chrome/Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows. MacOS
Contributor guide
Research direction
Start with the linked StackBlitz reproduction, especially src/app/app.component.html and the referenced angular.json, src/styles.scss, src/app/app.module.ts, and src/index.html files. Reproduce the outline mat-form-field with a mat-icon matPrefix in the initially hidden mat-tab, then trace the Angular Material form-field and tab behavior; done means the label and text align correctly after switching tabs.
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
- 38/100