aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-08-21 14:13:47 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-08-21 14:13:47 +0000
commit374f2cbb55a026630bbb355d7e4cc1976908bf72 (patch)
tree64d187e3e1133248bdb2eff42a6470953ee38823 /ui
parent5293096526a21ac39ae2244d578e5c9908490cee (diff)
downloadjquery-ui-374f2cbb55a026630bbb355d7e4cc1976908bf72.tar.gz
jquery-ui-374f2cbb55a026630bbb355d7e4cc1976908bf72.zip
draggable: direct removal of draggable element on drop event doesnt make used plugins fire an error anymore, fixes #4550
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;