You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT REQ] Add mousedown event to closeEvents property #1223
I would like to see the event mousedown added to the property closeEvents.
I have an element that can be resized by dragging the edges and I want to close the tooltip on that element when that happens.
@roelkoops until we implement this event, you can use a controlled state to control the tooltip show/hide, so you can build any custom logic to hide/show it
@roelkoops it already works they apply every event inside this file. The only problem is that the type isn't supported. So force the type and add the mousedown: true;closeEvents={{ mousedown: true } as Record<string, boolean>}
Activity
github-actions commentedon Nov 27, 2024
This issue is stale because it has not seen activity in 30 days. Remove the
stalelabel or comment within 14 days, or it will be closed.roelkoops commentedon Nov 27, 2024
Comment to remove the "Stale" label
danielbarion commentedon Dec 2, 2024
@roelkoops until we implement this event, you can use a controlled state to control the tooltip show/hide, so you can build any custom logic to hide/show it
github-actions commentedon Mar 3, 2025
This issue is stale because it has not seen activity in 30 days. Remove the
stalelabel or comment within 14 days, or it will be closed.roelkoops commentedon Mar 3, 2025
Comment to remove the "Stale" label
harmadema commentedon Apr 7, 2026
@roelkoops it already works they apply every event inside this file. The only problem is that the type isn't supported. So force the type and add the
mousedown: true;closeEvents={{ mousedown: true } as Record<string, boolean>}react-tooltip/src/components/Tooltip/Tooltip.tsx
Line 606 in f18cb72
@danielbarion The only thing that needs to be done is add html events to the AnchorCloseEvents type. Or add a [string]: boolean variant.
danielbarion commentedon Apr 7, 2026
Thanks for letting me know, I'll try to release it this week @harmadema
danielbarion commentedon Apr 9, 2026
Can you please test the beta release from here: #1266 (comment)
And let me know your thoughts?
cc @roelkoops @harmadema
roelkoops commentedon Apr 10, 2026
I tried the beta and can confirm this works as intended 👍
Thanks for implementing this @danielbarion and also thanks to @harmadema
Do you have an ETA for when this will be included in a release?
danielbarion commentedon Apr 10, 2026
Thanks for confirming. I plan to release it today with another bug :)