aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-05-16 16:25:03 -0500
committerScott González <scott.gonzalez@gmail.com>2011-05-25 16:13:00 -0400
commited65ce7a14882df12d2e029a4be84680a8b68240 (patch)
tree55753b3f12e856d021fccfc60af10a814986dd9f
parent9c0cd477848aa3782b36b8af95b073e11285e653 (diff)
downloadjquery-ui-ed65ce7a14882df12d2e029a4be84680a8b68240.tar.gz
jquery-ui-ed65ce7a14882df12d2e029a4be84680a8b68240.zip
Sortable: Changed to check the parent's length so that the dom position of the removed element is not updated. Fixed #4088 - Unable to remove() ui.draggable (sortable item) immediately after the drop callback.
(cherry picked from commit 8e8a7b015f4f5a76c187dfca9af7519ae356bb16)
-rw-r--r--ui/jquery.ui.sortable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 91a42658f..c4814c2aa 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -984,7 +984,7 @@ $.widget("ui.sortable", $.ui.mouse, {
// 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);
+ if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
this._noFinalSort = null;
if(this.helper[0] == this.currentItem[0]) {