Skip to content
Permalink
Browse files

Core, Draggable: Fixed #7800 - Draggable helper="clone" doesn't remov…

…e the dragged clone if original element is removed upon drop
  • Loading branch information...
maljub01 committed Oct 17, 2011
1 parent bdd602e commit c3c84002898163c3c6625a4fedcddf1434f8e448
Showing with 2 additions and 2 deletions.
  1. +1 −1 ui/jquery.ui.core.js
  2. +1 −1 ui/jquery.ui.draggable.js
@@ -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;
}

@@ -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))) {

0 comments on commit c3c8400

Please sign in to comment.
You can’t perform that action at this time.