]> source.dussan.org Git - jquery-ui.git/commitdiff
Sortable: Changed to check the parent's length so that the dom position of the remove... 294/head
authorkborchers <k_borchers@yahoo.com>
Mon, 16 May 2011 21:25:03 +0000 (16:25 -0500)
committerkborchers <k_borchers@yahoo.com>
Mon, 16 May 2011 21:25:03 +0000 (16:25 -0500)
ui/jquery.ui.sortable.js

index 78349669a2e5c01267dca443f6237f25a4c76b8e..a8084412f80a6d783f12c1c0afb8a99eae21db9c 100644 (file)
@@ -983,7 +983,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]) {