Skip to content

Commit

Permalink
Draggable: Incase helper is not set to 'original' succeed with revert…
Browse files Browse the repository at this point in the history
… action even if the original element has been removed. Fixes #6871
  • Loading branch information
cburgdorf committed Jan 18, 2011
1 parent 015ea16 commit 0ed452b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.draggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ $.widget("ui.draggable", $.ui.mouse, {
this.dropped = false;
}

//if the original element is removed, don't bother to continue
if(!this.element[0] || !this.element[0].parentNode)
//if the original element is removed, don't bother to continue if helper is set to "original"
if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
return false;

if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
Expand Down

0 comments on commit 0ed452b

Please sign in to comment.