calebjacob / tooltipster

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

Height not calculated correctly for tooltips with images on Safari #799

Closed locomo closed 4 years ago

locomo commented 4 years ago

For tooltips containing images I'm finding that the image height does not seem to be included in the height calculation. I'm only observing this in Safari desktop browser - Chrome, Firefox, Brave etc all seem fine. If the tooltip only contains an image, the height is ~20px (basically the padding of the container). If the tooltip contains text and image, the height is only big enough to display the text. The tooltip is scrollable.

I've read some accounts that there may be issues with 'getBoundingClientRect' in Safari?

louisameline commented 4 years ago

Hi, thanks for your message. Does it happen only the first time the image is loaded? If yes, please read the FAQ about thr issue of async content.

locomo commented 4 years ago

thanks for the quick reply .. it's not only the first time .. tooltip height is still not calculated correctly even if i open, close and then reopen the same tooltip

but thanks for the FAQ (sorry i missed that) .. adding explicit dimensions with css to the images seems to have solved my problem

it does seem like there is something specific with Safari going on however as it worked fine for me in other browsers without needing to add the CSS dimensions

anyhow thanks!

louisameline commented 4 years ago

You're welcome! Your Safari might have cache disabled.