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

Inconsistent behavior when browsing pages #1016

Closed
1 task done
ghost opened this issue Nov 17, 2018 · 2 comments
Closed
1 task done

Inconsistent behavior when browsing pages #1016

ghost opened this issue Nov 17, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 17, 2018

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

Bug report

Sometimes the links from the search results will not take you to the relevant header but to some other arbitrary position on the result page (often the end of the page). I don't know what triggers this inconsistency but you can reproduce it on vuepress.vuejs.org.

Steps to reproduce

As I don't know the exact repro case, all I can tell is to use the search box from different places on the site and observe the behavior when jumping to a search result item. For example, browse to vuepress.vuejs.org/plugin/, scroll a bit down and enter "algo" in the search box. Hitting enter takes me to "Popup UI to refresh contents", while "Default theme config" is highlighted in the sidebar - although the URL refers to the correct anchor. Refreshing the page takes me to the correct position.

The expected behavior in the above example would be to jump to the anchor algolia-search

Really hope you can fix this as I would love ot use vuepress!

  • OS: Ubuntu 18.04
  • Browser version: Firefox 63.0 without extensions.
@ghost ghost mentioned this issue Nov 17, 2018
1 task
@ghost ghost changed the title Inconsistent behavior when jumping to search results Inconsistent behavior when browsing pages Nov 17, 2018
@ghost
Copy link
Author

ghost commented Nov 17, 2018

Reproduction: Open https://vuepress.vuejs.org/miscellaneous/design-concepts.html#convention-over-configuration, click document directory structure, then use your browser to go back (or forward and back again if it worked the first time).

The issue is that when you browse back to convention over configuration in the example, the scroll position is wrong (the menu item is activated though).

This does not happen when you first browse https://vuepress.vuejs.org/miscellaneous/design-concepts.html#convention-over-configuration, paste https://vuepress.vuejs.org/guide/directory-structure.html in your your browser, go to the page and then use back and forward.

Hope this helps to track down what is going on there.

@ulivz
Copy link
Member

ulivz commented Nov 18, 2018

Thanks for the report, fixed it in vuepress@1.0.0-alpha.23

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