mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-24 16:14:44 +00:00
Hopefully the last set of fixes for issue 1712 - $.mobile.changePage broken in latest
- The test case calls changePage() with a hash ("#b"). In our normal processing of clicks/form submits we strip it before calling. The old code did a strip in changePage() just in case, so I added it back in to fix the last bug.
This commit is contained in:
parent
6fdb90df17
commit
ef9d55f4b6
1 changed files with 6 additions and 5 deletions
|
|
@ -396,7 +396,7 @@
|
|||
|
||||
// The absolute version of the URL passed into the function. This
|
||||
// version of the URL may contain dialog/subpage params in it.
|
||||
absUrl = url, // XXX_jblas: path.makeAbsolute( url ),
|
||||
absUrl = path.stripHash( url ), // XXX_jblas: path.makeAbsolute( url ),
|
||||
|
||||
// The absolute version of the URL minus any dialog/subpage params.
|
||||
// In otherwords the real URL of the page to be loaded.
|
||||
|
|
@ -421,8 +421,9 @@
|
|||
settings.data = $.param( settings.data );
|
||||
}
|
||||
// XXX_jblas: We should be checking to see if the url already has a query in it.
|
||||
url += url + "?" + settings.data;
|
||||
absUrl += absUrl + "?" + settings.data;
|
||||
settings.data = undefined;
|
||||
fileUrl = path.getFilePath( absUrl );
|
||||
}
|
||||
|
||||
// Check to see if the page already exists in the DOM.
|
||||
|
|
@ -440,7 +441,7 @@
|
|||
if ( page.length ) {
|
||||
if ( !settings.reloadPage ) {
|
||||
enhancePage( page, settings.role );
|
||||
deferred.resolve( url, options, page );
|
||||
deferred.resolve( absUrl, options, page );
|
||||
return deferred.promise();
|
||||
}
|
||||
dupCachedPage = page;
|
||||
|
|
@ -527,7 +528,7 @@
|
|||
$.mobile.hidePageLoadingMsg();
|
||||
}
|
||||
|
||||
deferred.resolve( url, options, page, dupCachedPage );
|
||||
deferred.resolve( absUrl, options, page, dupCachedPage );
|
||||
},
|
||||
error: function() {
|
||||
//set base back to current path
|
||||
|
|
@ -549,7 +550,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
deferred.reject( url, options );
|
||||
deferred.reject( absUrl, options );
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue