-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Open
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
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
If the cursor is on the matButton and the button becomes disabled then the mouseleave event is fired. That does not happen with the native button.
Reproduction
StackBlitz link: https://stackblitz.com/edit/ykrngweg?file=src%2Fexample%2Fbutton-disabled-mouseleave-example.html
Steps to reproduce:
- Click on a "Click to disable" elevated material button, keep the cursor on the button
- Button becomes disabled
mouseleaveevent is fired and the event message gets added to the array showing "mouseleave fired on material!" text
Clicking on the native button with the same onclick and onmouseleave logic does not fire the mouseleave event, only when the cursor actually left the button element
Expected Behavior
The material button behaviour should be the same as of the native button - mouseleave should not be triggered if the cursor did not leave the button
Actual Behavior
mouseleave event is fired when the material button becomes disabled even if the cursor is over the button
Environment
- Angular: 21.1.2
- CDK/Material: 21.1.2
- Browser(s): Chrome 145.0.7632.109 (arm64)
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 15.7.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team