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

Commit

Permalink
Navigation: Click handler correctly handles absolute URL with hash
Browse files Browse the repository at this point in the history
Fixes gh-5759
  • Loading branch information
Gabriel Schulhof committed Aug 20, 2014
1 parent 2f974cf commit c6afe30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/navigation.js
Expand Up @@ -363,9 +363,10 @@ define( [
// lists and select dialogs, just write a hash in the link they
// create. This means the actual URL path is based on whatever
// the current value of the base tag is at the time this code
// is called. For now we are just assuming that any url with a
// hash in it is an application page reference.
if ( href.search( "#" ) !== -1 ) {
// is called.
if ( href.search( "#" ) !== -1 &&
!( $.mobile.path.isExternal( href ) && $.mobile.path.isAbsoluteUrl( href ) ) ) {

href = href.replace( /[^#]*#/, "" );
if ( !href ) {
//link was an empty hash meant purely
Expand Down

0 comments on commit c6afe30

Please sign in to comment.