mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-23 09:20:28 +00:00
added a unit test for last-scroll remembering.
This commit is contained in:
parent
d68d5064bc
commit
28bb987729
1 changed files with 32 additions and 0 deletions
|
|
@ -110,6 +110,38 @@
|
|||
start();
|
||||
}]);
|
||||
});
|
||||
|
||||
asyncTest( "page last scroll distance is remembered while navigating to and from pages", function(){
|
||||
$.testHelper.pageSequence([
|
||||
navigateTestRoot,
|
||||
|
||||
function(){
|
||||
$( "body" ).height( $( window ).height() + 500 );
|
||||
},
|
||||
|
||||
function(){
|
||||
$.mobile.changePage( "external.html" );
|
||||
},
|
||||
|
||||
function(){
|
||||
window.scrollTo( 0, 300 );
|
||||
},
|
||||
|
||||
navigateTestRoot,
|
||||
|
||||
function(){
|
||||
$.mobile.changePage( "external.html" );
|
||||
},
|
||||
|
||||
function(){
|
||||
same( $(window).scrollTop(), 300 );
|
||||
$( "body" ).height( "" );
|
||||
start();
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
asyncTest( "forms with data attribute ajax set to false will not call changePage", function(){
|
||||
var called = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue