mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
draggable: direct removal of draggable element on drop event doesnt make used plugins fire an error anymore, fixes #4550
This commit is contained in:
parent
5293096526
commit
374f2cbb55
@ -157,6 +157,10 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
dropped = this.dropped;
|
||||
this.dropped = false;
|
||||
}
|
||||
|
||||
//if the original element is removed, don't bother to continue
|
||||
if(!this.element[0] || !this.element[0].parentNode)
|
||||
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))) {
|
||||
var self = this;
|
||||
|
Loading…
Reference in New Issue
Block a user