saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.13k stars 1.3k forks source link

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

Closed tats-u closed 4 hours ago

tats-u commented 6 hours ago

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.

github-actions[bot] commented 6 hours ago

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 commented 4 hours ago

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.