Skip to content
Browse files

Sortable: Changed to check the parent's length so that the dom positi…

…on of the removed element is not updated. Fixed #4088 - Unable to remove() ui.draggable (sortable item) immediately after the drop callback.
  • Loading branch information
kborchers committed May 16, 2011
1 parent db3d194 commit 8e8a7b015f4f5a76c187dfca9af7519ae356bb16
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.sortable.js
@@ -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]) {

0 comments on commit 8e8a7b0

Please sign in to comment.
You can’t perform that action at this time.