Bootstrap 5 Tooltip with inline SVG
See original GitHub issueI’ve been testing the Bootstrap v5 tooltips (https://v5.getbootstrap.com/docs/5.0/components/tooltips/) but having an issue using them with inline SVGs. The tooltip triggers off when hovering over the SVG - resulting in a flicker of the tooltip showing/hiding. Simplified test-case CodePen here: https://codepen.io/coliff/pen/JjXpOJY
The same code works fine with Bootstrap v4. https://codepen.io/coliff/pen/VwadMKX
(side note; as a stop-gap fix adding the css svg {pointer-events: none} fixes the issue).
This issue was discussed in a bit more detail at: https://github.com/twbs/bootstrap/discussions/31618
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:22 (17 by maintainers)
Top Results From Across the Web
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 storage ...
Read more >How do I show a bootstrap tooltip with an SVG object?
The problem was that the tooltip that Bootstrap v2.2.2 generates is a <div> that was getting inserted inside the <svg> , which made...
Read more >Tooltips on SVG using Bootstrap+Jquery - CodePen
Quick proof of concept for a project: Styling inline SVGs with CSS and using tooltips Manually edited the SVG for proper ID's for...
Read more >Bootstrap 5 Tooltip - W3Schools
Tooltips. The Tooltip component is small pop-up box that appears when the user moves the mouse pointer over an element: Hover over me!...
Read more >Bootstrap Tooltips - GeeksforGeeks
In order to introduce tooltip, we add the data-toggle attribute to an element and we need to initialize the tooltip with jQuery. jQuery...
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 Free
Top 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

Sorry I got infected with Covid lately so I wasn’t able yet to really have a look. But to give some little update. It’s actually not as easy as I considered this to be with just enabling
mouseenterormouseleaveat least not for the delegated handlers. Will continue to try finding a way/place to patch in the neccessary functionality.@mdo sure, I will have a look. IMO the easiest way to fix this would be to just allow the native
mouseenterormouseleaveevents. Is there any particular reason why it was decided not to use them?