1 From 35377ae9b70887b91d20b1898dbf903a3a28d03a Mon Sep 17 00:00:00 2001
2 From: Przemyslaw Ciezkowski <p.ciezkowski@samsung.com>
3 Date: Wed, 3 Apr 2013 12:52:54 +0200
4 Subject: [PATCH] JQM: navigation-fix
6 Change-Id: Id1713bdcb51129043f520e164bf5fbe6fe67727f
8 .../js/jquery.mobile.navigation.js | 12 +++++++++---
9 1 files changed, 9 insertions(+), 3 deletions(-)
11 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
12 index 9048789..694a7f0 100644
13 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
14 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
15 @@ -763,6 +763,10 @@ define( [
16 if ( !settings.reloadPage ) {
17 enhancePage( page, settings.role );
18 deferred.resolve( absUrl, options, page );
19 + //if we are reloading the page make sure we update the base if its not a prefetch
20 + if( base && !options.prefetch ){
23 return deferred.promise();
26 @@ -799,7 +803,8 @@ define( [
29 // Reset base to the default document base.
31 + // only reset if we are not prefetching
32 + if ( base && typeof options.prefetch === "undefined" ) {
36 @@ -834,7 +839,8 @@ define( [
37 url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
41 + //dont update the base tag if we are prefetching
42 + if ( base && typeof options.prefetch === "undefined") {
46 @@ -1442,7 +1448,7 @@ define( [
47 if ( url && $.inArray( url, urls ) === -1 ) {
50 - $.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ) } );
51 + $.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ),prefetch: true } );