Skip to content

Commit 00ea853

Browse files
johnbenderasyraf9
authored andcommitted
wait to focus page header until after mobile rendering class is stripped Fixes jquery-archive#2965
1 parent acd6588 commit 00ea853

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.
@@ -1168,6 +1166,12 @@
11681166
//remove initial build class (only present on first pageshow)
11691167
$html.removeClass( "ui-mobile-rendering" );
11701168

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

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

0 commit comments

Comments
 (0)