atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.92k stars 520 forks source link

Fix bug: hovering a hiding content leads to incorrect position. #883

Closed zhaoyao91 closed 3 years ago

zhaoyao91 commented 3 years ago

Currently there is a bug when hovering the hiding content, it will be re-triggered but the position is wrong, since the previous cursor index is lost.

Kapture 2020-12-11 at 01 20 55

This PR fix it by retain the cursor index.

atomiks commented 3 years ago

I think onUntrigger is necessary if you, for example, use the focus trigger afterward. Does that still work fine with this change?

zhaoyao91 commented 3 years ago

I think onUntrigger is necessary if you, for example, use the focus trigger afterward. Does that still work fine with this change?

Sorry for this missing. I have added onHidden for an alternative and tried that under mouseenter focus it now behaves as previous.

I am not sure is there any other missing, thanks for further checking.