question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Closing existing tooltips when opening a new tooltip

See original GitHub issue

Hi, I’m running into an issue where if you already have a tooltip open and click on another button that activates a tooltip, you will have two tooltips open. If you click outside the tooltips, all open tooltips close which works as intended. How do I close existing tooltips when a user clicks on the button that opens a new tooltip?

I tried running this code within the onClick behavior on the buttons and surrounding divs as suggested by the docs, but it wouldn’t close existing tooltips:

ReactTooltip.hide();

ReactTooltip.hide(target) Hide the tooltip manually, the target is optional, if no target passed in, all existing tooltips will be hidden

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

2reactions
ministerfacecommented, Jun 3, 2020

Hi. I solved this problem by simply adding a property isCapture={true}

0reactions
EdgarKismancommented, Aug 20, 2020

Hi. I solved this problem by simply adding a property isCapture={true}

Thanks, worked for me.

This should be added to the Documentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Close all other jQueryUI tooltips when a new tooltip is opened
What I was asking for was unnecessary. If used correctly jQueryUI tooltips will automatically close themselves based on the focus/hover ...
Read more >
Tooltips · Bootstrap v5.2
As a workaround, you'll want to trigger the tooltip from a wrapper <div> or <span> , ideally made keyboard-focusable using tabindex="0" .
Read more >
Bootstrap Tooltip - examples & tutorial
Bootstrap tooltips are little clouds with a brief text message, triggered by clicking on a specific element or hovering over it.
Read more >
Tooltip: no way to keep content open on hover. - jQuery UI
As far as I can tell, there is no way to keep a tooltip open when you change focus from the tooltip parent...
Read more >
[#MDL-73336] The new drawers tooltips should only be visible ...
The new drawers use bootstrap tooltips to explain what open and close ... that the tooltip appears immediately after opening/closing the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found