Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit cdc034b

Browse files
committed
fix(sortable): manage appendTo option
appendTo option mess up ng-repeat comments
1 parent 5168154 commit cdc034b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sortable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ angular.module('ui.sortable', [])
133133
// the start and stop of repeat sections and sortable doesn't
134134
// respect their order (even if we cancel, the order of the
135135
// comments are still messed up).
136-
if (hasSortingHelper(element, ui) && !ui.item.sortable.received) {
136+
if (hasSortingHelper(element, ui) && !ui.item.sortable.received &&
137+
element.sortable( 'option', 'appendTo' ) === 'parent') {
137138
// restore all the savedNodes except .ui-sortable-helper element
138139
// (which is placed last). That way it will be garbage collected.
139140
savedNodes = savedNodes.not(savedNodes.last());

0 commit comments

Comments
 (0)