atomiks / tippyjs

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

instance.destroy(); is not working #1033

Closed rwaidaAlmehanni closed 2 years ago

rwaidaAlmehanni commented 2 years ago

Bug description

tooltip display text when hover on icon working fine but when switch language without refreshing page and hover again the tooltip display 2 tooltips for each language and when use destroy it is not working

Reproduction

CodePen link: https://codepen.io/atomiks/pen/yvwQyZ

ysilvela commented 2 years ago

The same happens to me. I use it within a calendar and when I change the month, the previous month's tooltips are still seen. The destroy method does not work as it should.

atomiks commented 2 years ago

The destroy method is well-tested so I doubt it doesn't work. You're probably recreating the tooltip accidentally after destroying it without realizing. Add some logs to see the code flow.