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 {
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();

Loading…
Cancel
Save