Components: mdTooltip when button is disabled

Created on 9 Jan 2017  路  3Comments  路  Source: angular/components

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.

Most helpful comment

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.

All 3 comments

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.

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

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._

Was this page helpful?
0 / 5 - 0 ratings