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.

4.2.11 no longer adds global __react_component_tooltip style

See original GitHub issue

The project I use this on has 2 entry points and it works for one entry point while it does not work for the other one. It used to work for both. The global style tag is missing, containing

    display: inline-block;
    font-size: 13px;
    left: -999em;
    opacity: 0;
    padding: 8px 21px;
    position: fixed;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
    top: -999em;
    visibility: hidden;
    z-index: 999;```

It happens only in 4.2.11, still working in 4.2.10.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:17
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
laurenz-glueckcommented, Jan 13, 2021

Will this issue be fixed anytime soon?

3reactions
BoresXPcommented, Dec 11, 2020

This happened for me too. Let’s see why it happens. injectStyles should do the trick but it doesn’t because domRoots is empty. This happens because getTargetArray returns empty array here. getTargetArray searches for any element having data-tip attribute and data-for with id of current tooltip (or no data-for if tooltip has no id). If there are no such element in DOM (you add them dynamically for example) default styles will never be inserted because injectStyles is called only once from componentDidMount. Solution here will be simple: fallback do nearest head section to tooltip itself if no elements with data-tip exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.2.11 no longer adds global __react_component_tooltip style
The project I use this on has 2 entry points and it works for one entry point while it does not work for...
Read more >
react-tooltip | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
react-tooltip/CHANGELOG.md - UNPKG
The CDN for react-tooltip.
Read more >
react-tooltip - npm
Start using react-tooltip in your project by running `npm i react-tooltip`. ... Add data-tip = "your placeholder" to your element.
Read more >
react-tooltip - Bountysource
4.2.11 no longer adds global __react_component_tooltip style $ 0 ... Created 2 years ago in wwayne/react-tooltip with 6 comments. ... border-radius: 3px; display: ......
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