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

Header anchor link clicks don't change current URL #1011

Closed
1 task done
dcastil opened this issue Nov 16, 2018 · 2 comments · Fixed by #1014
Closed
1 task done

Header anchor link clicks don't change current URL #1011

dcastil opened this issue Nov 16, 2018 · 2 comments · Fixed by #1014

Comments

@dcastil
Copy link
Contributor

dcastil commented Nov 16, 2018

  • I confirm that this is a issue rather than a question.

Bug report

When I click on the # in the header anchor of any heading, the page scrolls to the heading but the anchor doesn't appear in the URL.

Version

v1.0.0-alpha.22

Steps to reproduce

# Clone vuepress repo
git clone [email protected]:vuejs/vuepress.git && cd vuepress

# Remove '@vuepress/active-header-links' from plugins in theme-default
sed -i '21d' ./packages/@vuepress/theme-default/index.js

# Start docs
yarn && yarn dev

What is expected?

After visiting http://localhost:8080/guide/ and clicking # next to the heading How It Works, the current URL is http://localhost:8080/guide/#how-it-works.

What is actually happening?

Current URL remains http://localhost:8080/guide/.

Other relevant information

  • Your OS: Mac OS Mojave v10.14.1
  • Node.js version: v10.13.0
  • Browser version: Chrome v70.0.3538.102 and Safari 12.0.1
  • Is this a global or local install? Local
  • Which package manager did you use for the install? Yarn
@ulivz
Copy link
Member

ulivz commented Nov 16, 2018

Why removing '@vuepress/active-header-links' from plugins in theme-default?

@dcastil
Copy link
Contributor Author

dcastil commented Nov 16, 2018

@ulivz As the plugin automatically inputs the last trespassed anchor into the URL, it‘s not possible to show the bug when the plugin is active.

In my private project I use vuepress with a custom ejected theme and don‘t want to use the plugin. But the anchors are broken because of that.

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

Successfully merging a pull request may close this issue.

2 participants