Skip to content

Commit 580bcf2

Browse files
committed
Trigger sortupdate after detaching placeholder.
1 parent 18c13fd commit 580bcf2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jquery.sortable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ jQuery.fn.sortable = function() {
1111
var dropHandler = function(e) {
1212
if (!dragging) return true;
1313
e.stopPropagation();
14-
placeholder.before(dragging);
15-
if (index != dragging.index()) {
16-
items.parent().trigger('sortupdate');
17-
}
14+
placeholder.after(dragging);
1815
return false;
1916
};
2017
var dragHandler = function(e) {
@@ -39,6 +36,9 @@ jQuery.fn.sortable = function() {
3936
}).bind('dragend', function() {
4037
dragging.removeClass('sortable-dragging').fadeIn();
4138
placeholder.detach();
39+
if (index != dragging.index()) {
40+
items.parent().trigger('sortupdate');
41+
}
4242
dragging = null;
4343
}).not('a[href], img').bind('selectstart', function() {
4444
this.dragDrop && this.dragDrop();

0 commit comments

Comments
 (0)