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

External links with hashes aren't clickable #5759

Closed
nightbook opened this issue Mar 12, 2013 · 2 comments
Closed

External links with hashes aren't clickable #5759

nightbook opened this issue Mar 12, 2013 · 2 comments
Assignees
Milestone

Comments

@nightbook
Copy link

Hello,
Found a minor issue with any external link that has a hash on it.
From - http://view.jquerymobile.com/1.3.0/docs/widgets/links/
'Links that point to other domains or that have rel="external", data-ajax="false" or target attributes will not be loaded with AJAX.'
This holds true for all but urls of other domains with hash, for example;
http://www.google.com#hash if used as the href in an internal link is unclickable.
See jsfiddle - http://jsfiddle.net/nXkzd/1/
I've tried with several cases all lead to those with hash.

Adding a rel="external" does fix the issue, but sadly the content is dynamically generated, also tried the data-ajax="false" on the container with no luck. Will revert to jQuery to add the rel="external" attribute to links with hash.

Appreciate you looking into it, let me know if any further info is of help
Cheers

@cgack
Copy link
Contributor

cgack commented Apr 24, 2014

The issue here is that the $.mobile.path.isExternal( href ) at https://github.com/jquery/jquery-mobile/blob/master/js/navigation.js#L389 is using an href that has already had the fragment removed from the url . I'd like to assume that moving this whole section of isExternal logic before the handling of the # at https://github.com/jquery/jquery-mobile/blob/master/js/navigation.js#L360
would work and still make sense to handle external links.

@nightbook
Copy link
Author

Thanks @gabrielschulhof and @cgack for the follow-up

gabrielschulhof pushed a commit that referenced this issue Aug 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants