bug(mat-form-field): mat-form-field appearance outline with mat-icon as matPrefix inside a mat-tab
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 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
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
贡献指南
调研方向
从链接的 StackBlitz 复现开始,重点查看 src/app/app.component.html 以及所引用的 angular.json、src/styles.scss、src/app/app.module.ts 和 src/index.html 文件。在最初隐藏的 mat-tab 中复现带有 mat-icon matPrefix 的 outline mat-form-field,然后跟踪 Angular Material 的 form-field 和 tab 行为;切换选项卡后标签和文本能够正确对齐即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100