Skip to content

Commit fda7167

Browse files
author
scottjehl
committed
reset scrollTop to 0, not defaultHomeScroll
1 parent 6333be5 commit fda7167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/jquery.mobile.navigation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,13 @@
425425
// using beforechangepage or popstate/hashchange (whichever comes first)
426426
$( document ).bind( "beforechangepage", getLastScroll );
427427
$( window ).bind( $.support.pushState ? "popstate" : "hashchange", getLastScroll );
428-
428+
429429
//function for transitioning between two existing pages
430430
function transitionPages( toPage, fromPage, transition, reverse ) {
431431

432432
//get current scroll distance
433433
var active = $.mobile.urlHistory.getActive(),
434-
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
434+
toScroll = active.lastScroll || ( $.support.touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
435435
screenHeight = getScreenHeight();
436436

437437
// Scroll to top, hide addr bar

0 commit comments

Comments
 (0)