Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to display tooltip on disabled button / element #7953

Closed
jorroll opened this issue Oct 22, 2017 · 3 comments
Closed

Ability to display tooltip on disabled button / element #7953

jorroll opened this issue Oct 22, 2017 · 3 comments

Comments

@jorroll
Copy link

jorroll commented Oct 22, 2017

Bug, feature request, or proposal:

feature (maybe bug)

What is the expected behavior?

Ability to display tooltip on disabled button / element.

e.g.

<button mat-button matTooltip="first enter email address" disabled [matTooltipDisabled]=false>
  Next
</button>

or

<button mat-button matTooltip="first enter email address" [matButtonDisabled]=true>
  Next
</button>

What is the current behavior?

Both tooltip and button are disabled using disabled input attribute. In order to just disable one or the other, you must use a helper element to split the component up.

e.g.

<span matTooltip="first enter email address">
  <button mat-button  [disabled]=true>
    Next
  </button>
</span>

What are the steps to reproduce?

See https://stackblitz.com/edit/angular-material2-issue

<button mat-button matTooltip="first enter email address" disabled [matTooltipDisabled]=false>
  Next
</button>

In the above, the both the button and the tooltip are disabled.

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

Ability to just disable a button / form element & not disable its associated tooltip, or vice-versa. E.g. this is useful if you'd like the tooltip to explain why the button is disabled.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

angular: 4.4.6
material: 2.0.0-beta.12

Is there anything else we should know?

@ghd8
Copy link

ghd8 commented Oct 22, 2017

see #5040

@jorroll
Copy link
Author

jorroll commented Oct 22, 2017

@ghd8 thanks. Disappointing.

@jorroll jorroll closed this as completed Oct 22, 2017
dszidi pushed a commit to truenas/webui that referenced this issue Feb 19, 2018
…d. Unable to add tooltip with warning message due to this issue. angular/components#7953
denis-yuen added a commit to dockstore/dockstore-ui2 that referenced this issue Aug 28, 2018
denis-yuen added a commit to dockstore/dockstore-ui2 that referenced this issue Aug 30, 2018
* Hide disabled option altogether

* would prefer tooltip, but for  angular/components#7953

* PR changes
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants