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

Commit 411c33c

Browse files
committed
default to the base href when dynamiceBase is disabled
1 parent 291764c commit 411c33c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

js/jquery.mobile.navigation.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,9 +1242,8 @@ define( [
12421242
allowSamePageTransition: false
12431243
};
12441244

1245-
/* Event Bindings - hashchange, submit, and click */
1246-
function findClosestLink( ele )
1247-
{
1245+
/* Event Bindings - hashchange, submit, and click */
1246+
function findClosestLink( ele ) {
12481247
while ( ele ) {
12491248
// Look for the closest element with a nodeName of "a".
12501249
// Note that we are checking if we have a valid nodeName
@@ -1262,17 +1261,16 @@ define( [
12621261
}
12631262

12641263
// The base URL for any given element depends on the page it resides in.
1265-
function getClosestBaseUrl( ele )
1266-
{
1264+
function getClosestBaseUrl( ele ) {
12671265
// Find the closest page and extract out its url.
12681266
var url = $( ele ).closest( ".ui-page" ).jqmData( "url" ),
12691267
base = documentBase.hrefNoHash;
12701268

1271-
if ( !url || !path.isPath( url ) ) {
1269+
if ( !$.mobile.dynamicBaseEnabled || !url || !path.isPath( url ) ) {
12721270
url = base;
12731271
}
12741272

1275-
return path.makeUrlAbsolute( url, base);
1273+
return path.makeUrlAbsolute( url, base );
12761274
}
12771275

12781276
//The following event bindings should be bound after mobileinit has been triggered

0 commit comments

Comments
 (0)