From: Paul Bakaus Date: Tue, 30 Dec 2008 16:34:23 +0000 (+0000) Subject: draggable: made connectToSortable work fine with helper: 'original' (by removing... X-Git-Tag: 1.6rc3~103 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b09c17bc799cf72af82038d136e7427bf84a043;p=jquery-ui.git draggable: made connectToSortable work fine with helper: 'original' (by removing top/left properties at sort end) --- diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index fc25ab3fd..a18546001 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -428,6 +428,11 @@ $.ui.plugin.add("draggable", "connectToSortable", { this.instance.element.triggerHandler("sortreceive", [event, $.extend(this.instance._ui(), { sender: inst.element })], this.instance.options["receive"]); this.instance.options.helper = this.instance.options._helper; + + if(inst.options.helper == 'original') { + this.instance.currentItem.css({ top: 'auto', left: 'auto' }); + } + } else { this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance this.instance._propagate("deactivate", event, inst);