mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: Incase helper is not set to 'original' succeed with revert action even if the original element has been removed. Fixes #6871
This commit is contained in:
parent
015ea163d1
commit
0ed452bf25
4
ui/jquery.ui.draggable.js
vendored
4
ui/jquery.ui.draggable.js
vendored
@ -192,8 +192,8 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|||||||
this.dropped = false;
|
this.dropped = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the original element is removed, don't bother to continue
|
//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)
|
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))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user