aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.draggable.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index ffda4a3f4..322592f1e 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -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;