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

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for #2865: when it's the first time we load the page, use the pag…
…e title if there is one
  • Loading branch information
Ghislain Seguin committed Oct 28, 2011
1 parent 3e99437 commit f81888c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/jquery.mobile.navigation.js
Expand Up @@ -1111,8 +1111,9 @@
path.set( url );
}

//if title element wasn't found, try the page div data attr too
var newPageTitle = toPage.jqmData( "title" ) || toPage.children(":jqmData(role='header')").find(".ui-title" ).getEncodedText();
// if title element wasn't found, try the page div data attr too
// If this is a deep-link or a reload ( active === undefined ) then just use pageTitle
var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children(":jqmData(role='header')").find(".ui-title" ).getEncodedText();
if( !!newPageTitle && pageTitle == document.title ) {
pageTitle = newPageTitle;
}
Expand Down

0 comments on commit f81888c

Please sign in to comment.