Skip to content

Adding SVG Support#19

Open
sDaniel wants to merge 1 commit intodrewwilson:masterfrom
sDaniel:master
Open

Adding SVG Support#19
sDaniel wants to merge 1 commit intodrewwilson:masterfrom
sDaniel:master

Conversation

@sDaniel
Copy link

@sDaniel sDaniel commented Jan 23, 2014

When using jquery.tiptip on SVG elements in Chrome, the tooltip appears in the top-left corner of the element instead of in the middle. In Firefox, the tooltip appears at the top of the page, nowhere near the element in question. This is caused because the jQuery method outerWidth() doesn't work with SVG. This patch uses getBoundingClientRect instead. Couldn't find any issues with normal links with a quick test.

'Some more infos on getBoundingClientRect'
Browser support: https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect
getBoundingClientRect is Awesome: http://ejohn.org/blog/getboundingclientrect-is-awesome/

@danimesq
Copy link

Hi, @sDaniel
I've forked TipTip to maintain it and use in all web projects of my community.
Please clone your pull request to: https://github.com/Software-js/TipTip
Thanks!

@danimesq
Copy link

Merge in: Floflis#11.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants