benbarnett/jQuery-Animate-Enhanced — Issue #58: cssCallback reacts to different transition
Author: warappa
Created: 2011-12-19 15:10:33+00:00
State: open

The cssCallback eventhandler doesn't check if the event comes from the dom-node the event was attached to.

This is a problem if you use jQuery animate to do i.e. a slow fade out of a container-div but have a child-div which also does transition (like due to a mouseover event). So if the transition of the child completes faster, the current event handler will react to THIS transition instead to the parent one.

Replace the first 2 lines of the eventhandler with the following and it should be fine (starting at line 486):

cssCallback = function(e)
{
if (e.eventPhase != 2) // not at dispatching target
return;