components icon indicating copy to clipboard operation
components copied to clipboard

mdTooltip when button is disabled

Open Miiekeee opened this issue 9 years ago • 3 comments

Bug, feature request, or proposal:

For the app we are building we would like to have the option to add a tooltip to a button when it is disabled.

What is the current behavior?

No tooltip when a button is disabled.

What is the use-case or motivation for changing an existing behavior?

We are using [attr.title]="model.IsActive ? 'This model is active' : 'This model is inactive'" to give the user a reason as for why they can't click on the button so they can take correct actions. We would like to use mdTooltip for this purpose.

Miiekeee avatar Jan 09 '17 15:01 Miiekeee

We had this issue on Material 1 as well. The problem is that the browser doesn't fire mouse events for disabled buttons. The two workarounds are to either wrap it in a div and set the tooltip on the wrapper, or use a div and style it as a button.

crisbeto avatar Jan 09 '17 16:01 crisbeto

Closing this as it's a browser behavior working as expected.

jelbourn avatar Jan 27 '17 02:01 jelbourn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.