Displaying Tooltip on Disabled Button

1 Answer 66 Views
Tooltip
Jörg
Top achievements
Rank 1
Jörg asked on 20 Sep 2024, 08:16 AM

Hello,

how can a tooltip be displayed on a disabled button?

I have a use case where the user should be informed of the reason for the disabled button through the tooltip.

Thank you in advance!

https://blazorrepl.telerik.com/GoENGaYV59uuC3IQ44

1 Answer, 1 is accepted

Sort by
1
Accepted
Tsvetomir
Telerik team
answered on 20 Sep 2024, 01:46 PM

Hello Jörg,

Thank you for the provided REPL snippet.

In general, the disabled HTML elements do not fire mouse events, so the Tooltip can't find out when the user hovers a disabled button. So the observed behavior is expected.

However, an alternative is to wrap the disabled button in some other HTML element for example div, and set the Tooltip to target it. To assist you further, I've modified the provided REPL example.

I hope this approach serves you well.

Regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Tooltip
Asked by
Jörg
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or