]> source.dussan.org Git - jquery-ui.git/commitdiff
Core, Draggable: Fixed #7800 - Draggable helper="clone" doesn't remove the dragged... 501/head
authorMarwan Al Jubeh <marwan.aljubeh@gmail.com>
Mon, 17 Oct 2011 16:14:54 +0000 (19:14 +0300)
committerMarwan Al Jubeh <marwan.aljubeh@gmail.com>
Mon, 17 Oct 2011 16:14:54 +0000 (19:14 +0300)
ui/jquery.ui.core.js
ui/jquery.ui.draggable.js

index 8bcc4c441cb7c8291c2f1cd99686b88f1790c9a7..f0cf89ba76e49c5784e04642db3727ce7a112c7c 100644 (file)
@@ -255,7 +255,7 @@ $.extend( $.ui, {
                },
                call: function( instance, name, args ) {
                        var set = instance.plugins[ name ];
-                       if ( !set || !instance.element[ 0 ].parentNode ) {
+                       if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
                                return;
                        }
        
index 6475ebd611644763be1d9cc57aa005c96e22fdb9..92dd13c0d41891ad61d6e7b7e37d9230a2cfb562 100644 (file)
@@ -208,7 +208,7 @@ $.widget("ui.draggable", $.ui.mouse, {
                }
                
                //if the original element is removed, don't bother to continue
-               if(!this.element[0] || !this.element[0].parentNode)
+               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))) {