wintercounter / Protip

A new generation jQuery Tooltip plugin
http://protip.rocks
MIT License
359 stars 38 forks source link

mouseleave onto tooltip #28

Closed ken-colvin closed 7 years ago

ken-colvin commented 7 years ago

Scenario: I am displaying img1 on mouseenter of img2 and having your tooltip to be displayed when img1 is hovered.

When there is a mouseleave of img2, I am removing img1

Problem: when img1 is hovered protip is displayed and if I hover of protip it is causing a mouseleave to be triggered and I am lossing img1 even though the mouse is still on top of img2. Also, your protip is still being displayed.

wintercounter commented 7 years ago

There are multiple options to handle this case, i would suggest the following: https://jsfiddle.net/qg01er9c/1/

data-pt-target=".container" will place the tooltip inside .container not into body. This will help to keep the hover state of .container

data-pt-interactive="true" will let you mouseover the tooltip.