diff options
author | martinf55 <martinf55@hotmail.com> | 2012-05-07 12:28:47 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-05-07 09:04:11 -0400 |
commit | 32f356bbfa9a8f3b90b4e64331e9108b4d87a349 (patch) | |
tree | fea59d2aecd71d9d50b3eedea92b816900f47124 | |
parent | a0c734b9e1d773167f3c9a84df851f4ae7faba87 (diff) | |
download | jquery-ui-32f356bbfa9a8f3b90b4e64331e9108b4d87a349.tar.gz jquery-ui-32f356bbfa9a8f3b90b4e64331e9108b4d87a349.zip |
Sortable: Moved change of helper position css. Fixed #5321 – Helper in a bottom-positioned Sortable is positioned wrong on drag start.
-rw-r--r-- | ui/jquery.ui.sortable.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 06df7971f..8ebd3b69c 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -154,11 +154,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, @@ -168,6 +163,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; |