4.2.11 no longer adds global __react_component_tooltip style
See original GitHub issueThe 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:
- Created 3 years ago
- Reactions:17
- Comments:7 (2 by maintainers)
Top 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 - 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will this issue be fixed anytime soon?
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.