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.

Gap in ngClass switching with ngAnimate results in incorrect animations #4892

Closed
@deakster

Description

@deakster

See this plunkr for a demo: http://plnkr.co/edit/fwA6naUUfH55aJTXYVgm?p=preview

Clicking on the element should transition it's width between the values in .small, .medium and .large, but what is happening is that in between a class change (from small -> medium, or medium -> large), it's width is resetting.

Removing the ngAnimate dependency will show the correct behaviour, as will reverting to 1.2rc3, 1.2rc2 and prior. This may potentially tie in with a change discussed towards the bottom of #3587?

The issue seems to be due to a gap in how performAnimation calls the domOperation between $animate.removeClass and $animate.addClass calls, presumably because of separate timeouts? I verified that if the dom operations are performed immediately (in the same call stack), the issue will not occur.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions