I use UI.Layout plugin to layout the page (top header, left menu, rest content). When I use the List DragSort for a list inside a UI.Layout content pane, the dragged item is bad positioned. It has an offset equal to the top left position of the UI.Layout pane. I'm testing with IE7, jquery 1.3.2, dragsort 0.3, ui.layout 1.2.0.
I have examined the plugin code, and I think the problem is caused because the list.draggedItem is positioned absolute inside a div already positioned absolute. The top, left css styles are not relative to the document, but to the parent absolute div. The offset() function is not 100% compatible with css({top:y,left:x}) when ancestor absolute divs are in play.
I have found a solution for me: substract the position of the absolute containers. My patch is adding this piece of code just before the last statement of the setPos function:
this.draggedItem.parents().each(function(){
if (this.style.position == "absolute") {
var offset = $(this).offset();
top -= offset.top;
left -= offset.left;
}
});