jquery/jquery-ui — pull request #1306 by scottgonzalez (2014-08-05 18:29:34+00:00)
Title: Tooltip: Treat the tooltip as closing until it's fully removed

This ensures that we don't trigger the close event twice if the tooltip is
destroyed during the hide animation.

----

The underlying problem was found by @leobalter when testing the new QUnit implementation which detects async assertion leaks. The assertion [here](https://github.com/jquery/jquery-ui/blob/750a8fd0c267aaba784f6dc76924619dbb459762/tests/unit/tooltip/tooltip_events.js#L34-L38) was running twice: once during close and once on destroy, because the tooltip was still animating at the time of the fixture cleanup.

I'm not thrilled about the fact that the tracking has to span multiple methods, but I'm not sure if there's another way to handle this.