Tooltip on an SVG element works, but prop validation errors out
See original GitHub issueDescribe the bug
It is possible to attach a tooltip via v-b-tooltip.hover
directive to an SVG element.
But when hovering, prop validation fails with:
Invalid prop: type check failed for prop “target”. Expected HTMLElement, got SVGCircleElement
Steps to reproduce the bug
- Create an SVG element with a simple circle path
- Put a
v-b-tooltip.hover
directive on it - Add a
title
attribute with a value for the tip - Hover over the SVG element you put the directive on
- Observe console log error
Expected behavior
No errors.
Versions
Libraries:
- BootstrapVue: 2.0.2
- Bootstrap: 4.3.1
- Vue: 2.6.10
Environment:
- Device: Mac
- OS: macOS
- Browser: Chrome
- Version: N/A
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
React does not recognize the X prop on a DOM element ...
But when I try to break it into components, I got the warning shown in the title and a few others. This works...
Read more >How to use SVGs in React | Sanity.io guide
There are a few ways to use an SVG in a React app: Use it as a regular image; Import it as a...
Read more >'value' is missing in props validation - You.com | The AI Search ...
The error is gone, but I want/need to use prop deconstruction. The error is probably caused by the deconstruction of the ResultListItem prop...
Read more >Tooltip - Peter Collingridge
For this tutorial, I'm going to write the code in a <script> element inside the SVG itself (which means it will still work...
Read more >title - HTML: HyperText Markup Language - MDN Web Docs
The title global attribute contains text representing advisory information related to the element it belongs to.
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
SVGElement
(which all other SVG elements inherit from) allowed prop type was added in BootstrapVue release v2.0.3 https://bootstrap-vue.js.org/docs/misc/changelog#bug-fixes-v203Oh this has been fixed!!!
https://github.com/bootstrap-vue/bootstrap-vue/commit/fab7fea0a69b36b95f0c9606122140fe771e8ac8