views:

19

answers:

0

Seeing some bizarre behavior in a list of scrollable items. The containment is set to the <ul /> element (which is droppable), and the draggable items are the <li /> members. The container is relative-positioned, and is a couple of divs down inside an absolute-positioned container (something like top: 150, left: 250).

When a drag starts on one of the list items (under Chrome 5, in my current tests), the whole window scrolls down until the list is at the top of the viewport. Breaking in the event handlers shows jquery.ui.draggable forcing a scroll here:

else if($(window).height() - (event.pageY - $(document).scrollTop()) <
        o.scrollSensitivity)
    scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);

Problem is, the window object is undefined or unknown (Chrome's debugger is apparently endless-looping trying to find it), and its height is 0. Should be 800 or so, in which case no scroll would occur.

Suggestions?