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 with anchors don't scroll to the correct position *the first time* #1541

Closed
1 task done
gauravve opened this issue Apr 13, 2019 · 3 comments
Closed
1 task done
Labels
contribution welcome Contributions welcome type: enhancement Request to enhance an existing feature

Comments

@gauravve
Copy link

Bug report

Anchors in links to other pages within a vuepress site don't work the first time the link is clicked. "Don't work" means that the page is not scrolled to the element, but the sidebar does have correct item highlighted. Once the page is loaded the first time, any consecutive clicks through the link to that page do work as expected.

Version

1.0.0-alpha.47

Steps to reproduce

Copied from #1499 comments.

I found a way to reproduce this using vuepress's own site. Go to this link and click the first link with the text header on that page. Again, it doesn't scroll to correct position on the first try, but does when you go back and try again AFTER the page has been loaded.

This only happens first time.

What is expected?

Links with anchors should work even when clicking them the first time during a session.

What is actually happening?

Links with anchors don't scroll to the correct position the first time they are used.

Other relevant information

  • Your OS: Mac OS Mojave
  • Node.js version: 8.15
  • Browser version: Chrome 73
  • Is this a global or local install? global
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? yes
@ulivz ulivz added type: enhancement Request to enhance an existing feature contribution welcome Contributions welcome labels Apr 14, 2019
@ulivz
Copy link
Member

ulivz commented Apr 14, 2019

Truly an issue and contribution welcome!

@gauravve
Copy link
Author

@ulivz Wondering if this is fixed as part of #1594

@ulivz
Copy link
Member

ulivz commented May 29, 2019

Yup, there are the same issue.

@ulivz ulivz closed this as completed May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome type: enhancement Request to enhance an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants