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.
ngAnimate doesn't remove class which is animating #13339
Closed
Description
Removing class which is currently animating doesn't work.
Angular Version: since 1.4.5 till 1.5.0-build.4389
Browser: Any
Reproducable: almost always (sometimes doesn't reproduce under debugging)
Operating system: Any
Detail
For the example of bug see plunker
By normal it should not have class pending
at the end.
What happens:
- Adding class
pending
- NgModel adds class
ng-valid-required
(it's joining animation and applies preparation class) - Timeout is fullfilled
- Trying to remove class.
Inside ngAnimations it checks that element has animations, it cannot be cancelled and skipped, so it's try to join animation. Because element is in running state it tries to normalize options. Function normalize options cannot find classpending
and remove it from options. Remove animation exits as invalid. - Class
pending
added to dom node