Docsify: Problems in page navigation

Created on 9 Dec 2016  路  8Comments  路  Source: docsifyjs/docsify

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

bug

Most helpful comment

The solution is in the window.$docsify object:

window.$docsify = {
  auto2top: true
};

Cheers 馃帀

All 8 comments

fixed 1.0.2

I will add progress bar in 1.1.0

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. :smile:

Sorry to miss the Problem 3.

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

Great! Thanks.

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

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

Fixed in 1.1.4

@QingWei-Li Thanks!

The solution is in the window.$docsify object:

window.$docsify = {
  auto2top: true
};

Cheers 馃帀

Was this page helpful?
0 / 5 - 0 ratings