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

Option to stop clicking on links from updating the hash in the location bar #39

Open
PawelDecowski opened this issue Mar 16, 2019 · 3 comments

Comments

@PawelDecowski
Copy link

Describe what you want:

In a project I’m working on, I don’t want the navigation clicks to change the URL. Eg:

URL:

https://example.com/

Navigation link:

<a href="#about">About</a>

After clicking, the viewport is scrolled to the #about anchor but the URL remains https://example.com/ (hash is not updated/added).

It could be an option on v-scroll-spy-link:

<ul v-scroll-spy-link="{updateHash: false}">
@devotoare
Copy link

I know it's late but I'm fairly certain you don't even need to put an href, so if you remove it, it should still work.

@PawelDecowski
Copy link
Author

@devotoare You’re correct. By removing href the behaviour is as expected. I’m probably missing something but how does it know where to scroll to without the href?

@devotoare
Copy link

@PawelDecowski Honestly not sure, haven't looked at the code very closely. Just figured I could answer the basic question since I tried it. Sorry

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

2 participants