sortable bug and fix (1.8.4): Dragging and item of an ul that has position absolute causes wrong alignment with the mouse

sortable bug and fix (1.8.4): Dragging and item of an ul that has position absolute causes wrong alignment with the mouse

The default example of the demos can be used to see this effect:

    
     http://jqueryui.com/demos/sortable/default.html
    
Just save the file and edit (or use firebug directly) the line
<ul id="sortable">
to
<ul id="sortable" style="position: absolute: bottom: 0; right: 0;">

HOW TO FIX IT
in the function _mouseStart of the sortable widget, look for the lines that says:
    // 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,
top: event.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
});

Just move the first 2 lines AFTER the $.extend, so the position of the helper will change to absolute AFTER the offset is computed (see functions _getParentOffset et al in the $.extend):

$.extend(this.offset, {
click: { //Where the click happened, relative to the element
left: event.pageX - this.offset.left,
top: event.pageY - this.offset.top
},
parent: this._getParentOffset(),
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");