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.

v5: Tooltip issue when containing HTML

See original GitHub issue

When there are DOM nodes inside a tooltip container, the hover states of those nodes seems to conflict with the container.

Reproduced: https://jsfiddle.net/89mpekhg/1/

Steps to reproduce:

  • Hover the “Hello” part (the tooltip shows up)
  • Hover the <strong> tag (the tooltip goes away ⚠️ )
  • And on mouseleave, errors are thrown into the console (teardown of an already gone tooltip ⚠️ )

Temporary workaround: Use the trigger: 'manual' option and handle the mouseenter and mouseleave manually.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mznetcommented, Sep 2, 2020

@silviodelgado That problem is handled by the PR. It would be resolved when the pr is merged.

1reaction
patrickhlaukecommented, Sep 1, 2020

I seem to remember this being a browser bug, or at least an unexpected spec issue.

As a possibly more robust and less invasive patch, try adding

[data-toggle="tooltip"] * { pointer-events: none; }

which makes any child element of the tooltip trigger “transparent” to the mouse, so the mouse events don’t get fired/blocked by child elements

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tooltips · Bootstrap v5.0
Tooltips can be triggered thanks to an element inside a shadow DOM. By default, this component uses the built-in content sanitizer, which strips...
Read more >
Bootstrap tooltips not working - Stack Overflow
The tooltip not working because you put the tooltip html before the javascript, so they don't know if there is a javascript for...
Read more >
Creating Tooltips | Tippy.js
The data-tippy-content attribute allows you to give different tooltip content to many different elements, while only needing to initialize once.
Read more >
How to Create Tooltips with Bootstrap 5 - Tutorial Republic
A tooltip is a small pop up that appears when user places the mouse pointer over an element such as link or buttons...
Read more >
Bootstrap 4 Tooltip - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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