You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when calling popperInstance.destroy(), not only does the instance get destroyed, but the computed position held in the tooltip inline styles is removed. Here's why I don't want that to happen.
When I call destroy, I want the popper instance to stop listening to resize/scroll events and recomputing the tooltip position frequently, but I want the last computed position to remain so I can perform a fade-out CSS animation. I have a work around, but it is silly:
const style = tooltip.getAttribute("style");
if (popper)
popper.destroy();
tooltip.style = style;
Also, it would really be good to add destroy to the docs, as it currently is only mentioned in passing in the example.
Why should this feature be part of the Popper's core?
I feel like this should probably be easy to implement as an option to destroy(), and could be useful to people.
The text was updated successfully, but these errors were encountered:
What you could do is to disable the event listeners (set the eventListeners modifier enabled flag to falase), fade the tooltip out, and then destroy the instance.
Feature description
Currently, when calling
popperInstance.destroy()
, not only does the instance get destroyed, but the computed position held in the tooltip inline styles is removed. Here's why I don't want that to happen.When I call destroy, I want the popper instance to stop listening to resize/scroll events and recomputing the tooltip position frequently, but I want the last computed position to remain so I can perform a fade-out CSS animation. I have a work around, but it is silly:
Also, it would really be good to add
destroy
to the docs, as it currently is only mentioned in passing in the example.Why should this feature be part of the Popper's core?
I feel like this should probably be easy to implement as an option to
destroy()
, and could be useful to people.The text was updated successfully, but these errors were encountered: