fmtvp/tal — pull request #70 by rsjtaylor (2013-07-04 09:46:42+00:00)
Title: Css3transitionendbug

This is to fix a bug with nested widgets when similar animations are performed at the same time using CSS3 animations.
Currently a child widget's animation ending can trigger the end of the parent's animation.

To reproduce, using CSS3 modifier:
Create a carousel within a container.
Set the carousel's animation duration to 1000ms and container's to 3000ms
Animate the container's left property using tweenElementStyle at the same time as you navigate the carousel (which in turn transitions the left property)

The container will snap to its end point early (when the carousel completes it's animation).

This is as the transitionend events bubble up through the DOM but the endFn in transition was not checking the event target, only that relevent properties were being transitioned. As a resuly anything higher up in the tree with the same properties being transitions was completed by the child event.

I've added a target check to transitionElement, and called this from the end fn of transition, there are also tests around this behaviour.