bug(FabButton): `matFab` shows hover and focus styling with `disabledInteractive`
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### 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
The `matFab` button behaves differently from `matButton` with the `disabledInteractive` property. When hovering or clicking the FAB button, it will animate the box shadow such that it looks interactive even if its not.
https://github.com/user-attachments/assets/e71708ff-e0f7-4ce1-944b-fcfa41a9645b
https://github.com/user-attachments/assets/b268dea9-627b-435f-8898-e427b0b379e7
### Reproduction
StackBlitz link: https://stackblitz.com/edit/rfnrrfrf?file=src%2Fexample%2Fbutton-disabled-interactive-example.css
Steps to reproduce:
1. Create a `matFab` with `disabled` + `disabledInteractive`
2. Hover the button
3. Click the button
### Expected Behavior
1. No hover box-shadow changes
2. No mousedown changes
### Actual Behavior
1. Hover will "raise" the button (increase box-shadow)
2. Clicking the button animates it
### Environment
- Angular: 20.2.9
- CDK/Material: 20.2.2
- Browser(s): Chrome/Edge (probably all)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
贡献指南
调研方向
从链接的 StackBlitz 复现开始,尤其关注 src/example/button-disabled-interactive-example.css,并比较设置 disabledInteractive 时的 matFab 和 matButton。确认 hover 和 mousedown 不再改变已禁用 FAB 的盒阴影,然后在复现中验证这两种行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 50/100