css "transition" on repeated elements disables animation #4713
Description
There is quite unexpected behavior of $animate
: if there is any "transition" present on element before adding/removing class, the animation is skipped.
This is caused by https://github.com/angular/angular.js/blob/master/src/ngAnimate/animate.js#L850
In this line there is a check if there is transition on the element before adding class. But this does not mean that this transition is currently in progress.
Here is common use case when this issue can cause big surprise for developers:
I have a list of elements that should be highlighted when hovered. If I put "transition" on element + use ngRepeat's animation (enter/leave/move).
Here is a plunker to illustrate that:
http://plnkr.co/edit/vI7LvG?p=preview
So currently the only workaround is to put "transitioned" elements inside elements that are repeated by ngRepeat