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

Commit

Permalink
wait to focus page header until after mobile rendering class is strip…
Browse files Browse the repository at this point in the history
…ped Fixes #2965
  • Loading branch information
johnbender committed Dec 14, 2011
1 parent a9e6de3 commit 15f1c6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/jquery.mobile.navigation.js
Expand Up @@ -536,8 +536,6 @@
//reset toPage height back
if( !touchOverflow ){
toPage.height( "" );
// Send focus to the newly shown page
reFocus( toPage );
}

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

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

releasePageTransitionLock();

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

1 comment on commit 15f1c6d

@johnbender
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placed this fix on master since it applies to the addition of 1.7. It's not dependent on it thought so it's reasonable to move this down to the patch release if we want to.

Please sign in to comment.