aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/ui.draggable.js2
-rw-r--r--ui/ui.droppable.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index 1179c7df8..fa8fbc611 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -309,7 +309,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
if ($.ui.ddmanager && !this.options.dropBehaviour)
var dropped = $.ui.ddmanager.drop(this, e);
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) {
+ 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;
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() {
self._propagate("stop", e);
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js
index 839ac0311..5d14a64d2 100644
--- a/ui/ui.droppable.js
+++ b/ui/ui.droppable.js
@@ -107,7 +107,7 @@ $.widget("ui.droppable", {
if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
$.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]);
this.element.triggerHandler("drop", [e, this.ui(draggable)], this.options.drop);
- return true;
+ return this.element;
}
return false;