Skip to content
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

Relative route links in IE10 creates incorrect url #227

Open
toha73 opened this issue Jun 19, 2014 · 0 comments
Open

Relative route links in IE10 creates incorrect url #227

toha73 opened this issue Jun 19, 2014 · 0 comments

Comments

@toha73
Copy link

toha73 commented Jun 19, 2014

When you have anchor elements where the href is relative, ie. '#/form1', and follow the link to the route the address in the address is incorrect in IE10. This is because pathname for anchor element is an empty string in IE10 if the link is relative with hash.

Try this is IE10 and other browsers to see the difference:

var anchor = document.createElement('a');
anchor.href = '#/design';
alert("'" + anchor.pathname + "'");

I added a small fix in Sammy.DefaultLocationProxy.fullPath that seems to work:

return [location_obj.pathname || window.location.pathname, location_obj.search, hash].join('');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant