When one has a div with style overflow:auto that has droppables registered within it, the Droppables.isAffected doesn't compensate for how much one has scrolled the element and as a result returns the wrong droppable if any based on the Event.pointerX and pointerY.
Changed dragdrop.js: Added option scrollingParent to Droppables.register which would indicate that the droppable is within an element that can scroll. If present for a droppable, it will add the scrollingParent's scrollLeft and scrollTop to the point[] in the isAffected method.
Diff attached based on version 1.5.3. Example attached as well, if one scrolls to the bottom of the div and tries to drag an item, one can see that the wrong droppables get affected based on positioning until the patch is applied.
Index: src/dragdrop.js
===================================================================
--- src/dragdrop.js (revision 3848)
+++ src/dragdrop.js (working copy)
@@ -44,6 +44,9 @@
},
isAffected: function(point, element, drop) {
+ if (drop.scrollingParent)
+ point = [point[0] + $(drop.scrollingParent).scrollLeft,
+ point[1] + $(drop.scrollingParent).scrollTop];
return (
(drop.element!=element) &&
((!drop._containers)