Skip to content

Tooltip with delayShow is not disappearing #163

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

Closed
caesarsol opened this issue Aug 1, 2016 · 2 comments
Closed

Tooltip with delayShow is not disappearing #163

caesarsol opened this issue Aug 1, 2016 · 2 comments

Comments

@caesarsol
Copy link

Hello,
the tooltip is not disappearing if the mouse is off the target when the delayShow triggers.
(#158 fixed only the console error, but not the unintended behavior)

Steps to reproduce:

  1. mouseOver on a target element with a delayShow > 0
  2. mouseOut when the tooltip has not yet appeared
  3. after the delayShow the tooltip appears and remains visible since the mouse is not on the target element.
@caesarsol
Copy link
Author

After further investigation, it appears that a workaround to use delayShow is setting a delayHide={1}, because this causes a reset of the Show timeout on mouseLeave.

https://github.com/wwayne/react-tooltip/blob/master/src/index.js#L285

Moving this.clearTimer() outside the if could fix the issue @wwayne?

wwayne added a commit that referenced this issue Aug 1, 2016
wwayne added a commit that referenced this issue Aug 1, 2016
@wwayne
Copy link
Collaborator

wwayne commented Aug 1, 2016

Thanks for pointing out the bug, this should be fixed in 3.1.3

@wwayne wwayne closed this as completed Aug 1, 2016
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