angular / angular/components

bug(FabButton): `matFab` shows hover and focus styling with `disabledInteractive`

Đang mở
#32,146 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/button P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết, đặc biệt là src/example/button-disabled-interactive-example.css, và so sánh matFab với matButton khi disabledInteractive được thiết lập. Xác nhận rằng hover và mousedown không còn thay đổi box shadow của FAB bị vô hiệu hóa, sau đó kiểm tra cả hai hành vi trong bản tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
50/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.