mineral-ui icon indicating copy to clipboard operation
mineral-ui copied to clipboard

[Tooltip] Tooltip should disappear when mouse leaves disabled trigger

Open coldpour opened this issue 7 years ago • 2 comments

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

  1. 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 with isEventOutsideComponent
  • 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 avatar Feb 13 '18 17:02 coldpour

@coldpour is there any update on this issue?

wmonk avatar Feb 13 '19 13:02 wmonk

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

kylegach avatar Feb 26 '19 21:02 kylegach