Skip to content

Commit

Permalink
Merge pull request #501 from maljub01/master
Browse files Browse the repository at this point in the history
Fixed ticket #7800 - Draggable helper="clone" doesn't remove the dragged clone if original element is removed upon drop
  • Loading branch information
scottgonzalez committed Nov 17, 2011
2 parents a8a0b02 + c3c8400 commit 69f6f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/jquery.ui.core.js
Expand Up @@ -255,7 +255,7 @@ $.extend( $.ui, {
}, },
call: function( instance, name, args ) { call: function( instance, name, args ) {
var set = instance.plugins[ name ]; var set = instance.plugins[ name ];
if ( !set || !instance.element[ 0 ].parentNode ) { if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
return; return;
} }


Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.draggable.js
Expand Up @@ -208,7 +208,7 @@ $.widget("ui.draggable", $.ui.mouse, {
} }


//if the original element is removed, don't bother to continue //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; 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))) { 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 69f6f58

Please sign in to comment.