mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(ngRepeat): preserve original position of elements that are being animated away
During the recent refactoring a typo was made that broke code that detects if we are already removed from the DOM (animation has completed). Closes #8918 Closes #8994
This commit is contained in:
@@ -379,7 +379,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
|
||||
block = lastBlockMap[blockKey];
|
||||
elementsToRemove = getBlockNodes(block.clone);
|
||||
$animate.leave(elementsToRemove);
|
||||
if (elementsToRemove[0].parent) {
|
||||
if (elementsToRemove[0].parentNode) {
|
||||
// if the element was not removed yet because of pending animation, mark it as deleted
|
||||
// so that we can ignore it later
|
||||
for (index = 0, length = elementsToRemove.length; index < length; index++) {
|
||||
|
||||
Reference in New Issue
Block a user