Browse Source

fix ng-repeat with other element in the same parent element

pull/715/head
livelazily 9 years ago
parent
commit
5617c507cf
  1. 5
      ng-sortable.js

5
ng-sortable.js

@ -121,6 +121,11 @@
} }
else { else {
items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]); items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]);
// move ng-repeat comment node to right position
if (nextSibling.nodeType === Node.COMMENT_NODE) {
evt.from.insertBefore(nextSibling, evt.item.nextSibling);
}
} }
scope.$apply(); scope.$apply();

Loading…
Cancel
Save