diff options
author | Christoph Burgdorf <christoph.burgdorf@bvsn.org> | 2011-01-18 23:10:43 +0100 |
---|---|---|
committer | Christoph Burgdorf <christoph.burgdorf@bvsn.org> | 2011-01-18 23:10:43 +0100 |
commit | 0ed452bf2581a83781c417dffe6ed4e3dbe2d676 (patch) | |
tree | 9be41a73aa9d9ee44554027c768afb265776b682 | |
parent | 015ea163d1995f5a3f42fd394d9db3abdc0fa16a (diff) | |
download | jquery-ui-0ed452bf2581a83781c417dffe6ed4e3dbe2d676.tar.gz jquery-ui-0ed452bf2581a83781c417dffe6ed4e3dbe2d676.zip |
Draggable: Incase helper is not set to 'original' succeed with revert action even if the original element has been removed. Fixes #6871
-rw-r--r-- | ui/jquery.ui.draggable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 7402a3aa7..4fef14498 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -192,8 +192,8 @@ $.widget("ui.draggable", $.ui.mouse, { this.dropped = false; } - //if the original element is removed, don't bother to continue - if(!this.element[0] || !this.element[0].parentNode) + //if the original element is removed, don't bother to continue if helper is set to "original" + if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") 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))) { |