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

Problems in page navigation #24

Closed
liulex opened this issue Dec 9, 2016 · 8 comments
Closed

Problems in page navigation #24

liulex opened this issue Dec 9, 2016 · 8 comments
Labels
bug confirmed as a bug

Comments

@liulex
Copy link
Contributor

liulex commented Dec 9, 2016

For example:

  1. Open https://docs.snipaste.com/
  2. Click 'Image Edit'
    • Problem 1: the page does not jump to #image-edit
  3. Scroll the current page, then click 'Image Edit' again, no effects
  4. But if we now click 'Snip' or 'Paste', the page jumps correctly
    • Problem 2: however, in the sidebar, the highlighted menu is still "Image Edit'
  5. Then click on another top-level page in the sidebar, for exmaple, 'Advanced Configs'
    • Problem 3: the page is not scrolled to top
@QingWei-Li QingWei-Li added the bug confirmed as a bug label Dec 11, 2016
@QingWei-Li
Copy link
Member

fixed 1.0.2

I will add progress bar in 1.1.0

@liulex
Copy link
Contributor Author

liulex commented Dec 13, 2016

Thanks for the update! It solved the first two problems, but the third seems not fixed...
Maybe it's intended? Because keeping the scrollbar position is good for single page sites like https://docsify.js.org/.
But for multi-page sites,I think it would be better to scroll to top when jumping to another page, or at least an option should be provided.

Or, maybe you could automatically insert an invisible element at the top of each page, with an id like "top"? So that I can append #top to the link to make it scroll to top.

Thanks for your work. 😄

@QingWei-Li
Copy link
Member

Sorry to miss the Problem 3.

I will add a option to automatically scroll to top in 1.1

@liulex
Copy link
Contributor Author

liulex commented Dec 13, 2016

Great! Thanks.

@liulex
Copy link
Contributor Author

liulex commented Dec 14, 2016

Another similar problem:
Chinese ids on the custom sidebar has no effect on mobile browsers. Tested on Firefox for Android.

@QingWei-Li
Copy link
Member

Chinese ids on the custom sidebar has no effect on mobile browsers. Tested on Firefox for Android.

Fixed in 1.1.4

@liulex
Copy link
Contributor Author

liulex commented Dec 17, 2016

@QingWei-Li Thanks!

@whyboris
Copy link

whyboris commented Sep 11, 2018

The solution is in the window.$docsify object:

window.$docsify = {
  auto2top: true
};

Cheers 🎉

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

3 participants