bradbirdsall/Swipe — Issue #9: Callback not always fired
Author: owilliams
Created: 2011-11-07 19:03:09+00:00
State: open

If you swipe very quickly several times it seems like the transition end event doesn't get fired (assuming because the actual transition doesn't fire?). This can be seen in the example below (mobile safari doesn't seem to like jsfiddle), everytime the callback is called we prepend to the list with the index. Press on the next link slowly and you see all callbacks, press quickly and you see we miss some indexes:

http://jsfiddle.net/4a2yy/3/

A hacky workaround is to call the callback at the end of the swipe function. I did this in the demo below, calling it within a setTimeout as otherwise it effects how smooth the transition appears in mobile safari.

http://jsfiddle.net/VecTR/9/