Skip to content
Permalink
Browse files

sortable: if current item was removed by user, it was reappended by t…

…he clearing logic (fixes #4088)
  • Loading branch information
Paul Bakaus
Paul Bakaus committed Feb 10, 2009
1 parent 4e61b95 commit 2e0f967680447e93e04eea2764f53ea3977b4f5f
Showing with 3 additions and 2 deletions.
  1. +3 −2 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]) {

0 comments on commit 2e0f967

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