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.

ngAnimate doesn't remove class which is animating #13339

Closed
@maxaon

Description

@maxaon

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:

  1. Adding class pending
  2. NgModel adds class ng-valid-required (it's joining animation and applies preparation class)
  3. Timeout is fullfilled
  4. 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 class pending and remove it from options. Remove animation exits as invalid.
  5. Class pending added to dom node

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions