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

routing bug #422

Open
sijakret opened this issue Mar 13, 2018 · 3 comments
Open

routing bug #422

sijakret opened this issue Mar 13, 2018 · 3 comments
Labels
bug confirmed as a bug

Comments

@sijakret
Copy link

i encounter a reproducible problem:

problem:
when you open a page via a deep link, like say like https://docsify.js.org/#/more-pages?id=ignoring-subheaders and then scroll to a different section (by reading on or scrolling up) there are two problems:

  1. the position indicator on the left does not keep updating (it only does that when you navigate to the root of tha page)
  2. because of this, if you scroll to a complete different place on the page and happen to click on the same link in the menu again (the one you deep-navigated to) nothing happens.

what i think should happen:

  1. As you scroll through the page the url in the browser should be replaced with your current position
  2. the indicator on the left should for sure not only work when navigating to the top of the page
@QingWei-Li QingWei-Li added the bug confirmed as a bug label Mar 14, 2018
@jhildenbiddle
Copy link
Member

Adding $0.02 since this issue is related to #522.

I agree that the sidebar should always reflect the current scroll position of the page: as the user scrolls, the active link in the sidebar should be highlighted in all scenarios.

I do not , however, think the URL should be updated as the page is scrolled. Instead, the URL should be updated only when a user-initiated navigation action has occurred (i.e. clicking a sidebar link). This is how anchor tags work in all browsers by default, so this feels like the expected behavior.

@timaschew
Copy link
Member

  1. because of this, if you scroll to a complete different place on the page and happen to click on the same link in the menu again (the one you deep-navigated to) nothing happens.

Is exactly a dupe of #522

@timaschew timaschew added this to the 4.x milestone Jan 29, 2019
@sijakret
Copy link
Author

Is exactly a dupe of #522

you mean #522 is a dupe of this ;)

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

No branches or pull requests

4 participants