Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 15f1c6d

Browse files
committed
wait to focus page header until after mobile rendering class is stripped Fixes #2965
1 parent a9e6de3 commit 15f1c6d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/jquery.mobile.navigation.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,6 @@
536536
//reset toPage height back
537537
if( !touchOverflow ){
538538
toPage.height( "" );
539-
// Send focus to the newly shown page
540-
reFocus( toPage );
541539
}
542540

543541
// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
@@ -1166,6 +1164,12 @@
11661164
//remove initial build class (only present on first pageshow)
11671165
$html.removeClass( "ui-mobile-rendering" );
11681166

1167+
// Send focus to the newly shown page. Moved from promise .done binding in transitionPages
1168+
// itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility)
1169+
// despite visibility: hidden addresses issue #2965
1170+
// https://github.com/jquery/jquery-mobile/issues/2965
1171+
reFocus( toPage );
1172+
11691173
releasePageTransitionLock();
11701174

11711175
// Let listeners know we're all done changing the current page.

0 commit comments

Comments
 (0)