]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable: Incase helper is not set to 'original' succeed with revert action even... 100/head 99/head
authorChristoph Burgdorf <christoph.burgdorf@bvsn.org>
Tue, 18 Jan 2011 22:10:43 +0000 (23:10 +0100)
committerChristoph Burgdorf <christoph.burgdorf@bvsn.org>
Tue, 18 Jan 2011 22:10:43 +0000 (23:10 +0100)
ui/jquery.ui.draggable.js

index 7402a3aa7fa9d83cb5eecee6a46d960fa8152d24..4fef1449899b9fd7ef45c2c1a55e901fe3e7cd14 100644 (file)
@@ -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))) {