madrobby/zepto — Issue #287: Problem with transitions events
Author: kossnocorp
Created: 2011-10-13 03:53:52+00:00
State: open

The webkitTransitionEnd event does not always fire. This is WebKit bug: http://www.cuppadev.co.uk/the-trouble-with-css-transitions/

Currently I solve this problem with adding setTimeout 0: https://github.com/madrobby/zepto/blob/master/src/fx.js#L60:L65

But this may be cause of async parallel animations on old and slow devices such 3Gs and lot's of Android's.

> In general, the transition event seems to behave as follows:

> Initial transition (element just created): **fail**
> Transition continuously (during transition): **mostly fail**
> Transition after a sufficient undefined delay: **pass**

How other libs fights with this problem:

Sencha: http://www.sencha.com/forum/showthread.php?116696-OPEN-602-webkitTransitionEnd-event-does-not-always-fire

jQuery-Animate-Enhanced: https://github.com/benbarnett/jQuery-Animate-Enhanced/issues/28