aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.sortable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-02-10 10:07:25 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-02-10 10:07:25 +0000
commit2e0f967680447e93e04eea2764f53ea3977b4f5f (patch)
tree8a863facaa61aefad78ceb916d2919c58a6bcd4f /ui/ui.sortable.js
parent4e61b952f32d80ba33a277da5a8681f5208caf18 (diff)
downloadjquery-ui-2e0f967680447e93e04eea2764f53ea3977b4f5f.tar.gz
jquery-ui-2e0f967680447e93e04eea2764f53ea3977b4f5f.zip
sortable: if current item was removed by user, it was reappended by the clearing logic (fixes #4088)
Diffstat (limited to 'ui/ui.sortable.js')
-rw-r--r--ui/ui.sortable.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index 56c613d04..e3a3f3d3d 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -901,8 +901,9 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
// everything else normalized again
var delayedTriggers = [], self = this;
- //We first have to update the dom position of the actual currentItem
- if(!this._noFinalSort) this.placeholder.before(this.currentItem);
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
this._noFinalSort = null;
if(this.helper[0] == this.currentItem[0]) {