Skip to content
Browse files

Merge pull request #294 from kborchers/bug_4088

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.
  • Loading branch information
scottgonzalez committed May 25, 2011
2 parents 129d5c7 + 8e8a7b0 commit fe4ae3045810421d2489175739098deb6852417b
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 fe4ae30

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