diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index ffda4a3f46..322592f1e2 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;