jquery/jquery-ui — pull request #871 by tjvantoll (2012-12-29 04:04:51+00:00)
Title: Selectable: Account for scrolling on the helper's initial position.  Fix...

...ed #8915 - Selectable: lasso offset issue with scrolling

I verified this fix does work but I need some help figuring out how I can write a test for this. What I have so far is:

var el = $( "#selectable1").selectable();
el.simulate( "mousedown", {
clientX: 10,
clientY: 10
});

$( window ).scrollTop( 1 ).scrollLeft( 1 );

var helper = $( ".ui-selectable-helper" );
ok( helper.css( "top" ), '11px' ); // Fails because the top is '10px'
ok( helper.css( "left" ), '11px' ); // Fails because the left is '10px'

The problem is neither `scrollTop` nor `scrollLeft` will actually change the the scroll position unless the window is actually scrollable. I can't think of a way to do this without mocking `scrollTop` and `scrollLeft`. Ideas?