From 8e899dab6cd1fc410bbda0e7c88cdf1a1c8e9764 Mon Sep 17 00:00:00 2001 From: martinf55 Date: Mon, 7 May 2012 12:28:47 +0200 Subject: [PATCH] =?utf8?q?Sortable:=20Moved=20change=20of=20helper=20posit?= =?utf8?q?ion=20css.=20Fixed=20#5321=20=E2=80=93=20Helper=20in=20a=20botto?= =?utf8?q?m-positioned=20Sortable=20is=20positioned=20wrong=20on=20drag=20?= =?utf8?q?start.=20(cherry=20picked=20from=20commit=2032f356bbfa9a8f3b90b4?= =?utf8?q?e64331e9108b4d87a349)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ui/jquery.ui.sortable.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index c1566fd58..57532aa03 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -155,11 +155,6 @@ $.widget("ui.sortable", $.ui.mouse, { left: this.offset.left - this.margins.left }; - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - $.extend(this.offset, { click: { //Where the click happened, relative to the element left: event.pageX - this.offset.left, @@ -169,6 +164,11 @@ $.widget("ui.sortable", $.ui.mouse, { relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper }); + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + //Generate the original position this.originalPosition = this._generatePosition(event); this.originalPageX = event.pageX; -- 2.39.5