r3103 committed - draggable: direct removal of draggable element on drop event doesnt ma...
Revision: 3103
Author: paul.bakaus
Date: Fri Aug 21 07:13:47 2009
Log: draggable: direct removal of draggable element on drop event doesnt
make used plugins fire an error anymore, fixes #4550
http://code.google.com/p/jquery-ui/source/detail?r=3103
Modified:
/trunk/ui/ui.draggable.js
=======================================
--- /trunk/ui/ui.draggable.js Thu Aug 6 11:10:10 2009
+++ /trunk/ui/ui.draggable.js Fri Aug 21 07:13:47 2009
@@ -157,6 +157,10 @@
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;