This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ng-leave removes the item when transition of a child element is finished #16210
Milestone
Comments
Hi, angular.js/src/ngAnimate/animateCss.js Lines 804 to 829 in 3651e42
|
3 tasks
Here's a plunker with a fix: https://plnkr.co/edit/nKU8lkiwVI6kphL99G6J?p=preview |
Looks good, thank you. |
Narretz
added a commit
that referenced
this issue
Sep 6, 2017
Previously, non-angular CSS transitions / animations on child elements would trigger the ngAnimate [transition|animation]end listener and could close a running animation prematurely. Closes #16210
Fix will be in the 1.6.7 release (commit 1391e99) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a ...
Current behavior:
ng-leave removes item too early, when some of the child elements finishes its transition
Expected / new behavior:
Items are not removed before ng-leave transition is finished.
Minimal reproduction of the problem with instructions:
Demo: https://plnkr.co/edit/pwDJA6s6ZJvfeJKiRjWk?p=preview
In the first list items are removed only after child transition is finished, so it works as expected.
In the second list items are removed a bit earlier so that child transition ends before ng-leave transition which leads to termination of ng-leave transition and removes the item.
Here is a workaround for this particular problem: https://plnkr.co/edit/0Xwe0JWfx5wmVRfDJi2i?p=preview
It cancels transition of child element, but it have to work without such hacks.
AngularJS version: 1.6.6
Browser: [Chromium 60 | Chrome 60 | Firefox 55]
Anything else:
I'm not sure how it works exactly, but transition time should probably be determined only on the item ng-leave is applied on, not anything else.
The text was updated successfully, but these errors were encountered: