mineral-ui
mineral-ui copied to clipboard
[Tooltip] Tooltip should disappear when mouse leaves disabled trigger
As a user, I would like to be able to use Tooltips on disabled buttons so that I can tell my users how to get those buttons enabled. I can currently do this however when I mouseout of the disabled button, the Tooltip should disappear and it currently doesn't.
AC
- Tooltip should disappear when no longer hovering disabled trigger.
More information
- Issue is that
mouseleave
is not fired for disabled element - Could potentially use
mouseout
combined withisEventOutsideComponent
- This is an open issue in React. https://github.com/facebook/react/issues/4251
- Here is how Sombrero solved it. https://github.com/RallySoftware/sombrero/commit/a36651da55b735f506b9b92eb307b1817521193d
- Workaround: User can click document or hit escape to close the tooltip.
@coldpour is there any update on this issue?
Hi, @wmonk.
We documented this issue when we first ran across it, but have not had time to address it, and I doubt we will anytime soon. We'd be happy to look at a PR with a fix!
In the meantime, try this workaround: https://codesandbox.io/s/61ojxpq3on