Skip to content
Permalink
Browse files

draggable: direct removal of draggable element on drop event doesnt m…

…ake used plugins fire an error anymore, fixes #4550
  • Loading branch information...
Paul Bakaus
Paul Bakaus committed Aug 21, 2009
1 parent 5293096 commit 374f2cbb55a026630bbb355d7e4cc1976908bf72
Showing with 4 additions and 0 deletions.
  1. +4 −0 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;

0 comments on commit 374f2cb

Please sign in to comment.
You can’t perform that action at this time.