Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

css "transition" on repeated elements disables animation #4713

Closed
@olostan

Description

@olostan

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions