diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/widgets/sortable.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/widgets/sortable.js b/ui/widgets/sortable.js index 8d2ada59a..f7298ebe5 100644 --- a/ui/widgets/sortable.js +++ b/ui/widgets/sortable.js @@ -224,18 +224,22 @@ return $.widget( "ui.sortable", $.ui.mouse, { left: event.pageX - this.offset.left, top: event.pageY - this.offset.top }, - parent: this._getParentOffset(), // This is a relative to absolute position minus the actual position calculation - // only used for relative positioned helper relative: this._getRelativeOffset() } ); - // Only after we got the offset, we can change the helper's position to absolute + // After we get the helper offset, but before we get the parent 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, { + parent: this._getParentOffset() + } ); + //Generate the original position this.originalPosition = this._generatePosition( event ); this.originalPageX = event.pageX; |