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

bug: Tooltip for button doesn't appear if the button is disabled #3286

Closed
tats-u opened this issue Nov 21, 2024 · 2 comments
Closed

bug: Tooltip for button doesn't appear if the button is disabled #3286

tats-u opened this issue Nov 21, 2024 · 2 comments

Comments

@tats-u
Copy link

tats-u commented Nov 21, 2024

What version of daisyUI are you using?

No response

Which browsers are you seeing the problem on?

Chrome, Firefox

Reproduction URL

https://codepen.io/tats-u/pen/wvVLOJE

Describe your issue

tooltip for btn doesn't work if combined with btn-disabled class or disabled attribute.
You want to describe why the button is disabled by a tooltip.

Copy link

Thank you @tats-u for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

@saadeghi
Copy link
Owner

saadeghi commented Nov 22, 2024

Disabled button disables everything including hover.

pointer-events: none;

There's no other way to disable all events. Without this, you would need to manually disable events in JS or replace the button with a fake button.

To show a tooltip, put the button in a wrapper:
https://play.tailwindcss.com/b8EjL9imA7

Let me know if you have a question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants