From: Christoph Burgdorf Date: Tue, 18 Jan 2011 22:10:43 +0000 (+0100) Subject: Draggable: Incase helper is not set to 'original' succeed with revert action even... X-Git-Tag: 1.8.9~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F99%2Fhead;p=jquery-ui.git Draggable: Incase helper is not set to 'original' succeed with revert action even if the original element has been removed. Fixes #6871 --- diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 7402a3aa7..4fef14498 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -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))) {