Created
October 4, 2012 13:32
-
-
Save gabrielschulhof/3833539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js | |
index 2a27957..f8507c2 100644 | |
--- a/js/jquery.mobile.navigation.js | |
+++ b/js/jquery.mobile.navigation.js | |
@@ -252,13 +252,17 @@ define( [ | |
return ( /^(:?\w+:)/ ).test( url ); | |
}, | |
+ _samePath: function( u ) { | |
+ return u.hrefNoSearch === documentUrl.hrefNoSearch || ( documentBaseDiffers && u.hrefNoSearch === documentBase.hrefNoSearch ); | |
+ }, | |
+ | |
//check if the specified url refers to the first page in the main application document. | |
isFirstPageUrl: function( url ) { | |
// We only deal with absolute paths. | |
var u = path.parseUrl( path.makeUrlAbsolute( url, documentBase ) ), | |
// Does the url have the same path as the document? | |
- samePath = u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ), | |
+ samePath = path._samePath( u ), | |
// Get the first page element. | |
fp = $.mobile.firstPage, | |
@@ -281,7 +285,7 @@ define( [ | |
//application document, whereas links embedded within the application | |
//document will be resolved against the document base. | |
if ( u.protocol !== "" ) { | |
- return ( u.hash && ( u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ) ) ); | |
+ return ( u.hash && path._samePath( u ) ); | |
} | |
return ( /^#/ ).test( u.href ); | |
}, |
OK, I don't get it. This change causes ... qunit(?) to break? Weird ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, this doesn't work because it causes push-state-disabled-base-tests.html to time out.