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

Commit 143cf21

Browse files
author
AngularUI (via TravisCI)
committed
Travis commit : build 176
1 parent 1cfa392 commit 143cf21

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-sortable",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"main": "./sortable.js",
55
"dependencies": {
66
"angular": "~1.2.x",

sortable.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,9 @@ angular.module('ui.sortable', []).value('uiSortableConfig', {}).directive('uiSor
9999
// the start and stop of repeat sections and sortable doesn't
100100
// respect their order (even if we cancel, the order of the
101101
// comments are still messed up).
102-
savedNodes.detach();
103102
if (element.sortable('option', 'helper') === 'clone') {
104-
// first detach all the savedNodes and then restore all of them
105-
// except .ui-sortable-helper element (which is placed last).
106-
// That way it will be garbage collected.
103+
// restore all the savedNodes except .ui-sortable-helper element
104+
// (which is placed last). That way it will be garbage collected.
107105
savedNodes = savedNodes.not(savedNodes.last());
108106
}
109107
savedNodes.appendTo(element);
@@ -129,7 +127,7 @@ angular.module('ui.sortable', []).value('uiSortableConfig', {}).directive('uiSor
129127
// if the item was not moved, then restore the elements
130128
// so that the ngRepeat's comment are correct.
131129
if ((!('dropindex' in ui.item.sortable) || ui.item.sortable.isCanceled()) && element.sortable('option', 'helper') !== 'clone') {
132-
savedNodes.detach().appendTo(element);
130+
savedNodes.appendTo(element);
133131
}
134132
}
135133
};

sortable.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)