Tippyjs: Tip with followCursor option appears wrong on svg lines

Created on 5 Dec 2017  路  20Comments  路  Source: atomiks/tippyjs

Sometimes it appears wrong (with followCursor option) on svg lines:

馃悰 bug

All 20 comments

Can you make a CodePen?

Sometimes it appears below, like in the image above:
https://codepen.io/tgotwig/pen/wPZJBa

Set flip: false in the tippy options.

If I set flip to false,
then it appears sometimes on top instead of below,
but not exactly on cursor position.

There is overflow prevention when the tooltip hits the edges of the viewport, is that what you mean?

The tooltip should be always on curser position, but isn't:

It's following the cursor perfectly on my end

https://gfycat.com/gifs/detail/PoliteFrequentLacewing

(Chrome 62, macOS 10.13)

EDIT: Maybe you are talking about when it's triggered by focus? In that case, it won't follow the cursor because it's assumed the user is tabbing to it and not using their mouse

I think this is an implementation failure,
because I used bootstrap tooltips in the past and there it works without this issue.

That's quite strange..

Can you check if this problem exists in 2.0.0-beta.2? There is a particular line that I think _might_ be causing it.

It also fails on beta-2.

How about the last of v1, v1.4.2? All those options except flip: false will work.

If not, go to the dist file of tippy.js and add console.log(e) to the function inside createFollowCursorListener(), and check the pageX, pageY coordinates when it happens. Perhaps the mouse event is not firing off the correct coordinates or something...

Maybe someone other can,
I just wanted to alert about this issue 馃槄

Hmm.. looking at your gif again, it seems that the show() is triggered, but not any mousemove, so the tooltip ends up being shown at its default position. Perhaps depending on the browser/OS/device, this can become an issue.

I believe a solution would be to also update the position on show, even without a mousemove event needing to fire off.


Also I noticed that the arrow/caret has a small white gap between itself and the tooltip. Have you fiddled with the CSS to see why? I've never seen that issue either!

Don't know how to inspect tooltips with the browser tools 馃

Use a click trigger, and scroll down to the bottom of the Elements tab (end of <body>) and you'll find the node there.

What is the selector name of an tooltip? 馃
print the whole document is too large for codepen

.tippy-popper

On Codepen it's within the iframe


translate3d has always the same values when the issue occurs

v2.0.3 fixes OP

@TGotwig can you make a new issue about the arrow problem? Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kearsan picture Kearsan  路  3Comments

patrickhlauke picture patrickhlauke  路  3Comments

dpatra picture dpatra  路  4Comments

khanamiryan picture khanamiryan  路  5Comments

Neill83 picture Neill83  路  3Comments