diff options
author | David Murdoch <musicisair@yahoo.com> | 2011-05-13 20:53:25 +0000 |
---|---|---|
committer | David Murdoch <musicisair@yahoo.com> | 2011-05-13 20:53:25 +0000 |
commit | 2bf45db9a556cfdcdb62e568a61423f395156482 (patch) | |
tree | 46a912540fda539c8abdb2159e1adbcde344201b /tests | |
parent | 2f4da6f13d825698ce1fed5c11b2b4e8afada04e (diff) | |
download | jquery-ui-2bf45db9a556cfdcdb62e568a61423f395156482.tar.gz jquery-ui-2bf45db9a556cfdcdb62e568a61423f395156482.zip |
Update test to make things a bit easier to test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/visual/position/position_within.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/visual/position/position_within.html b/tests/visual/position/position_within.html index e53e9ddf6..a20ae7b56 100644 --- a/tests/visual/position/position_within.html +++ b/tests/visual/position/position_within.html @@ -19,6 +19,9 @@ height:100%; width:100%; margin:0; + /* force scroll bar*/ + min-height:800px; + min-width:800px; } .demo-description { text-align:center; @@ -76,7 +79,7 @@ collision: $( "#collision_horizontal" ).val() + " " + $( "#collision_vertical" ).val() }); } - $( ".demo" ).append("<div style='width:5000px;height:5000px;' />").css("overflow","auto").scrollTop( 500 ).scrollLeft( 500 ); + $( ".demo" ).append("<div style='width:5000px;height:5000px;' />").css("overflow","auto"); $( ".positionable" ).css( "opacity", 0.5 ); @@ -91,8 +94,9 @@ // reset offset before calculating it $( "#offset" ).val( "0" ); position(function( result ) { - $( "#offset" ).val( "" + ( ui.offset.left - result.left ) + - " " + ( ui.offset.top - result.top ) ); + var demo = $( ".demo" ); + $( "#offset" ).val( "" + ( ui.offset.left - result.left - demo.offset().left + demo.scrollLeft() ) + + " " + ( ui.offset.top - result.top - demo.offset().top + demo.scrollTop() ) ); position(); }); } |