calebjacob / tooltipster

A jQuery tooltip plugin
MIT License
2.76k stars 480 forks source link

Tooltip shown outside parent container visible area #738

Closed magnetnation closed 5 years ago

magnetnation commented 6 years ago

Hi,

I have noticed that if we have a scrollable container with content that is partially "scrolled away" - the tooltip will be shown outside of the parent container in "nowhere".

image

In this illustration the "Hello" yellow content to the right of the parent border is actually invisible, and tooltip looks like hanging over other elements that might be alongside parent container.

The issue is somewhat similar to https://github.com/iamceege/tooltipster/issues/673, although in this case it does look like a bug.

Thanks for great work.

louisameline commented 6 years ago

Hello, Thanks for the kind words and the report :) You're right, it gets displayed and that's weird, although we do make it disappear as soon as there is scroll and reappear when it's back on screen. We should ideally detect what portion is visible and center the tooltip on it, but that's actually quite complex. Unless somebody wants to create a plugin to fix this edge case, this is probably a won't fix unfortunately.