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

Links to "#" get rewritten to just "" which causes a refresh if clicked #672

Closed
jakemac53 opened this issue Jul 31, 2014 · 2 comments · Fixed by googlearchive/polymer-dev#84
Assignees
Labels

Comments

@jakemac53
Copy link
Contributor

https://gist.github.com/jakemac53/ff1dc6c1ff4ae6e72cdf

It is fairly common for people to use an href of "#" to style something like a link but make it not actually link anywhere. If this is done inside a polymer element though, then it gets rewritten to just an empty href which causes a full page refresh when clicked.

@sorvell
Copy link
Contributor

sorvell commented Aug 26, 2014

Unfortunately, we're assuming we can rely on the hash property of the URL object, but apparently we cannot. See this, for example: http://jsbin.com/topil/1/edit.

We'll need to specifically handle the case when a hash exists but is empty.

@sorvell
Copy link
Contributor

sorvell commented Aug 26, 2014

@azakus Please review the PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants