Skip to content

Commit 0ed452b

Browse files
committed
Draggable: Incase helper is not set to 'original' succeed with revert action even if the original element has been removed. Fixes #6871
1 parent 015ea16 commit 0ed452b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.draggable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ $.widget("ui.draggable", $.ui.mouse, {
192192
this.dropped = false;
193193
}
194194

195-
//if the original element is removed, don't bother to continue
196-
if(!this.element[0] || !this.element[0].parentNode)
195+
//if the original element is removed, don't bother to continue if helper is set to "original"
196+
if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
197197
return false;
198198

199199
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 commit comments

Comments
 (0)