tooltip displays at a wrong offset for elements with display set to none
See original GitHub issueCodePen demo
Note: this pen will not demonstrate the issue when the element is hovered when Tooltip initializes. You might want to reload the frame after the pen loads.
https://codepen.io/anon/pen/NvJeRy?editors=1111
Steps to reproduce the problem
- Set element’s style to
display: none
- Instantiate a Tooltip on that element
- Set element’s style to
display: inline-block
What is the expected behavior?
At step 3. Tooltip should display at a correct offset i.e. as it would display when the element was set to display: inline-block
at step 1. to begin with.
What went wrong?
At step 3. Tooltip displays at a wrong offset.
Any other comments?
How it is after hover (see codepen):
How it should be after hover (see codepen)::
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
tooltip displays at a wrong offset for elements with display set ...
This issue penetrates to Tooltip.js only. Have you considered delaying the positioning of the Tooltip.js to when the anchor element becomes ...
Read more >Bootstrap tooltip in wrong position on initial hover, then in ...
I have an svg on the page with elements that are being added and sized with javascript (d3). It seems like I need...
Read more >Building a simple tooltip component that never goes off screen
How to build a simple, responsive and lightweight tooltip web component, with minimal HTML, CSS and JavaScript and no framework dependency.
Read more >Tooltips · Bootstrap v5.0
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes for local title ...
Read more >Visualization: Column Chart - Google Developers
Like all Google charts, column charts display tooltips when the user hovers ... You create a stacked column chart by setting the isStacked...
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
You can do it like this https://jsfiddle.net/z4zeg74w/
This is all cool stuff and cool ideas. But they are too specific and you can implement them manually