An old question, but I struggled with this for several hours today, so I decided that I would share what I found out.
Scrolling sort is a function of the scrollParent offset, the current scroll position, the current position of the element, and scroll sensitivity. Sorting is performed when _mouseStart starts. This sets scrollParent and caches its offset for the current sort. Armed with this knowledge, we can do a little shuffle in the event handler:
over: function (event, ui) { ui.item.data('sortableItem').scrollParent = ui.placeholder.parent(); ui.item.data('sortableItem').overflowOffset = ui.placeholder.parent().offset(); }
Fires when a dragged item changes containers. The placeholder has already moved to the new container when you click on the over event. The code gets a new scrollParent and returns the offset.
I forked the Tats_innit fiddle for brevity: http://jsfiddle.net/3E2Hg/84/
ScrollParent gets links elsewhere in the entire event structure, so I'm not sure if this is bulletproof. However, I think this is a good starting point. If I get any errors, I will update this answer.
Rakuen42
source share