This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,9 @@ angular.module('ui.sortable', [])
115
115
// the start and stop of repeat sections and sortable doesn't
116
116
// respect their order (even if we cancel, the order of the
117
117
// comments are still messed up).
118
- savedNodes . detach ( ) ;
119
118
if ( element . sortable ( 'option' , 'helper' ) === 'clone' ) {
120
- // first detach all the savedNodes and then restore all of them
121
- // except .ui-sortable-helper element (which is placed last).
122
- // That way it will be garbage collected.
119
+ // restore all the savedNodes except .ui-sortable-helper element
120
+ // (which is placed last). That way it will be garbage collected.
123
121
savedNodes = savedNodes . not ( savedNodes . last ( ) ) ;
124
122
}
125
123
savedNodes . appendTo ( element ) ;
@@ -153,7 +151,7 @@ angular.module('ui.sortable', [])
153
151
// if the item was not moved, then restore the elements
154
152
// so that the ngRepeat's comment are correct.
155
153
if ( ( ! ( 'dropindex' in ui . item . sortable ) || ui . item . sortable . isCanceled ( ) ) && element . sortable ( 'option' , 'helper' ) !== 'clone' ) {
156
- savedNodes . detach ( ) . appendTo ( element ) ;
154
+ savedNodes . appendTo ( element ) ;
157
155
}
158
156
}
159
157
} ;
You can’t perform that action at this time.
0 commit comments