Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left-shifted tooltips on SVG elements #14013

Closed
BertrandBordage opened this issue Jul 2, 2014 · 3 comments
Closed

Left-shifted tooltips on SVG elements #14013

BertrandBordage opened this issue Jul 2, 2014 · 3 comments

Comments

@BertrandBordage
Copy link

See http://jsfiddle.net/hqDF7/ for a minimal example.

The issue appeared with 8534e12.
Those lines use .outerWidth & .outerHeight and override what .getBoundingClientRect was returning. Unfortunately, .outer[Width|Height] always return 0 for SVG elements, while .getBoundingClientRect returns the expected output.

Removing the incriminated lines "fixes" the issue. But of course I guess it creates other issues.

This issue is similar to #5956.

@twbs-lmvtfy
Copy link

Hi @BertrandBordage!

You appear to have posted a live example (http://jsfiddle.net/hqDF7/show/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might be causing your issue:

  • line 39, column 50: Attribute title not allowed on element circle at this point.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@BertrandBordage
Copy link
Author

The valid SVG would be:

<svg width="100" height="100">
    <g>
        <circle cx="50" cy="50" r="10" />
        <title>Test</title>
    </g>
</svg>

But of course, tooltips can't be applied on this.

@cvrebert cvrebert added this to the v3.2.1 milestone Jul 2, 2014
cvrebert added a commit that referenced this issue Jul 2, 2014
cvrebert added a commit that referenced this issue Jul 6, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented Jul 6, 2014

Closing per #14015.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants