Skip to main content

Search and Top Navigation

Ticket #3556: sortable-3556.patch


File sortable-3556.patch, 1.0 KB (added by alan.castro, January 07, 2009 10:03PM UTC)

patch that fixes revert problem with draggable that has connectToSortable option.

### Eclipse Workspace Patch 1.0
#P jquery-ui-trunk
Index: ui/ui.draggable.js
===================================================================
--- ui/ui.draggable.js	(revision 1535)
+++ ui/ui.draggable.js	(working copy)
@@ -139,7 +139,7 @@
 		if ($.ui.ddmanager && !this.options.dropBehaviour)
 			var dropped = $.ui.ddmanager.drop(this, event);
 
-		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))) {
+		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))) && (!this.options.connectToSortable)) {
 			var self = this;
 			$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
 				self._propagate("stop", event);

Download in other formats:

Original Format