-
-
Notifications
You must be signed in to change notification settings - Fork 533
[BUG] When using same single tooltip on page but changing delayShow, tooltip shows after mouseleave #1204
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
Comments
This does not seem like an issue with just the It mainly relates to the tooltip anchor being unmounted after triggering the tooltip with the delay. By default, if the tooltip doesn't find the original anchor, it attaches to the first anchor that is available. I've managed to create a simple example reproducing the issue. https://stackblitz.com/edit/vitejs-vite-bbqqcx?file=src%2FApp.tsx 2024-07-02_17-37-38.mp4I might be able to get to it this week, so we'll let you know when we have a fix for it. |
This beta release should fix it Please let us know if it works for your project, and check PR #1205 for more info if you're interested. Assuming it is fixed for you, we will close this as soon as we release an official version with the fix. |
Yes, this code fixes the issue in my project. Thank you! |
Official release with the fix |
Bug description
If you are using one tooltip component and then different elements change the delayShow prop, it will show the next tooltip after mouseleave.
Version of Package
v5.26.4
To Reproduce
Use one component
<ReactTooltip id="test"/>
Then use
data-tooltip-id="test"
on multiple elements. Give elements different values for attributedata-tooltip-delay-show
Then hover on the first element using that tooltip, and mouseleave the element and see tooltip delay show
Expected behavior
I would expect the tooltip to delay show, then hide, and remain hidden until I hovered on another element
Screenshots

Desktop (please complete the following information if possible or delete this section):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: