reset scrollTop to 0, not defaultHomeScroll

This commit is contained in:
scottjehl 2011-09-07 12:36:28 -04:00
parent 6333be5ddf
commit fda71670b4

View file

@ -425,13 +425,13 @@
// using beforechangepage or popstate/hashchange (whichever comes first)
$( document ).bind( "beforechangepage", getLastScroll );
$( window ).bind( $.support.pushState ? "popstate" : "hashchange", getLastScroll );
//function for transitioning between two existing pages
function transitionPages( toPage, fromPage, transition, reverse ) {
//get current scroll distance
var active = $.mobile.urlHistory.getActive(),
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
toScroll = active.lastScroll || ( $.support.touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
screenHeight = getScreenHeight();
// Scroll to top, hide addr bar