stevenbenner / jquery-powertip

:speech_balloon: A jQuery plugin that creates hover tooltips.
https://stevenbenner.github.io/jquery-powertip/
MIT License
821 stars 137 forks source link

Fixes the positioning of a following tooltip in a horizontally scrolled document #166

Closed mbraeutigam closed 6 years ago

mbraeutigam commented 7 years ago

Given a horizontally scrolled document (e.g. width=10000px) with a tooltip following the mouse and colliding with the right bound of the document will cause the tooltip to disappear / change the coordinates to windowWidth - tipWidth instead of the scrolling position of the document + windowWidth - tipWidth

mbraeutigam commented 7 years ago

Additional jsFiddle showing the bug: https://jsfiddle.net/2t4ahe2x/1/

stevenbenner commented 6 years ago

This makes sense. Thanks for the jsFiddle example, made it really easy to test. I guess I simply never bothered to test the mouse follow tooltips in a horizontal scrolling scenario. Good catch!

Pull request accepted. Thanks for the patch!