diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-05-30 10:07:49 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-05-30 10:07:49 +0000 |
commit | 5b19d8e7236710a94e458e1e1b1e84b488f72ab0 (patch) | |
tree | 126b6ea7df5615a2392341f93fd06a52af65a793 /ui/source | |
parent | 3c2a4f57affea3da49e0e3ca1a3c73e31180ede0 (diff) | |
download | jquery-ui-5b19d8e7236710a94e458e1e1b1e84b488f72ab0.tar.gz jquery-ui-5b19d8e7236710a94e458e1e1b1e84b488f72ab0.zip |
draggable: fixed issue with connectToSortable, where the helper property was not properly restored later on
Diffstat (limited to 'ui/source')
-rw-r--r-- | ui/source/ui.draggable.js | 5 |
1 files 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();
|