HubSpot/drop

Clear timeouts when destroying the drop

streamside opened this issue · 0 comments

An error is thrown if using a delay to open the drop but the the drop has been destroyed at the point in time when it us supposed to be opened/closed.

Example: The user hovers an icon, a setTimeout(open, 300) is created, something else happens which destroys the drop (calling destroy()), the 300 ms has passed and the drop now tries to open but it no longer exist and an error is displayed.