Search and Top Navigation
Ticket #4303: sortable-item-sender.patch
File sortable-item-sender.patch, 1.3 KB (added by asannes, August 05, 2009 07:30AM UTC)
Make sure item is the item being added and sender is still the sender
--- 1.7.2/ui.sortable.js 2009-06-04 07:22:56.000000000 +0200
+++ fixed/ui.sortable.js.fixed 2009-08-05 08:57:45.000000000 +0200
@@ -909,7 +909,7 @@
this.currentItem.show();
}
- if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this)); });
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
@@ -977,7 +977,7 @@
absolutePosition: self.positionAbs, //deprecated
offset: self.positionAbs,
item: self.currentItem,
- sender: inst ? inst.element : null
+ sender: self.fromOutside ? self.fromOutside.element : null
};
}
Download in other formats:
Original Format
File sortable-item-sender.patch, 1.3 KB (added by asannes, August 05, 2009 07:30AM UTC)
Make sure item is the item being added and sender is still the sender
--- 1.7.2/ui.sortable.js 2009-06-04 07:22:56.000000000 +0200
+++ fixed/ui.sortable.js.fixed 2009-08-05 08:57:45.000000000 +0200
@@ -909,7 +909,7 @@
this.currentItem.show();
}
- if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this)); });
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
@@ -977,7 +977,7 @@
absolutePosition: self.positionAbs, //deprecated
offset: self.positionAbs,
item: self.currentItem,
- sender: inst ? inst.element : null
+ sender: self.fromOutside ? self.fromOutside.element : null
};
}