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.

Tooltip on an SVG element works, but prop validation errors out

See original GitHub issue

Describe 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

  1. Create an SVG element with a simple circle path
  2. Put a v-b-tooltip.hover directive on it
  3. Add a title attribute with a value for the tip
  4. Hover over the SVG element you put the directive on
  5. 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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tmorehousecommented, Oct 10, 2019

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-v203

Read more comments on GitHub >

github_iconTop 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 >

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