twitter/bootstrap — pull request #5598 by victor-homyakov (2012-10-22 08:45:07+00:00)
Title: Guarantee invokation of `complete()`

Transition end event isn't reliable (browser may not fire it, or delay its firing until next transition, in many circumstances, read more in related issue #5462 https://github.com/twitter/bootstrap/issues/5462).

In order to guarantee proper inner state of `Collapse` object (especially `Collapse#transitioning`, because its invalid state will block all successive transitions) additional callback invokation is added with `setTimeout()`.

Timeout value for `setTimeout()` should be equal to transition time from `component-animation.less` - I cannot find a better solution for now.