From 5b19d8e7236710a94e458e1e1b1e84b488f72ab0 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 30 May 2008 10:07:49 +0000 Subject: [PATCH] draggable: fixed issue with connectToSortable, where the helper property was not properly restored later on --- ui/source/ui.draggable.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/source/ui.draggable.js b/ui/source/ui.draggable.js index 7ef5f84e6..64e206245 100644 --- a/ui/source/ui.draggable.js +++ b/ui/source/ui.draggable.js @@ -460,7 +460,7 @@ //Also propagate receive event, since the sortable is actually receiving a element this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]); - this.instance.options.helper = "original"; + this.instance.options.helper = this.instance.options._helper; } }); @@ -492,6 +492,7 @@ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it this.instance.options.helper = function() { return ui.helper[0]; }; e.target = this.instance.currentItem[0]; @@ -519,7 +520,7 @@ this.instance.cancelHelperRemoval = true; this.instance.options.revert = false; //No revert here this.instance.mouseStop(e, true); - this.instance.options.helper = "original"; + this.instance.options.helper = this.instance.options._helper; //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size this.instance.currentItem.remove(); -- 2.39.5