New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External links with hashes aren't clickable #5759

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

Comments

Projects
None yet
3 participants
@nightbook

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

This comment has been minimized.

Show comment
Hide comment
@cgack

cgack Apr 24, 2014

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@nightbook

nightbook Aug 21, 2014

Thanks @gabrielschulhof and @cgack for the follow-up

Thanks @gabrielschulhof and @cgack for the follow-up

gabrielschulhof added a commit that referenced this issue Aug 21, 2014

agcolom added a commit to agcolom/jquery-mobile that referenced this issue Nov 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment