aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-12-30 16:34:23 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-12-30 16:34:23 +0000
commit3b09c17bc799cf72af82038d136e7427bf84a043 (patch)
tree7501bc0f1ab56b3ad527ae9ecac6f9b839e10686
parent1828aab85dc57aa43d6a023bf668d20f2ce2aff2 (diff)
downloadjquery-ui-3b09c17bc799cf72af82038d136e7427bf84a043.tar.gz
jquery-ui-3b09c17bc799cf72af82038d136e7427bf84a043.zip
draggable: made connectToSortable work fine with helper: 'original' (by removing top/left properties at sort end)
-rw-r--r--ui/ui.draggable.js5
1 files changed, 5 insertions, 0 deletions
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);