-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 ID Anchor Jumps (revisited) #559
Comments
@mlschuh This is the same I'm struggeling with. Problem is that images are async loaded, but docsify doesn't wait until images are present. So if the image has not a given height, the images height is 0 when first visiting the page. If the image is loaded later, the offset between your anchor jump and the current scroll position is exactly the height of the image(s). |
@silentHoo That makes sense in my mind. I'll ask around to my web dev friends to see if there's a way to at least set some kind of (short) timeout on the anchor jump to at least give the browser a fighting chance of being closer. Tricky part in my mind is to make sure the user still has an impression that the page is loading during that timeout. |
This is what I did to overcome this issue: #351 (comment) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Related to #332 but with a reproduced project file.
Attached is a slim version of our project where we were able to reproduce it. docsify-anchor-jump-incorrect.zip
To Reproduce:
Go to http://localhost:3000/#/isaac-gui-noimages?id=user-pane and see that it appears close to the anchor.
Go to http://localhost:3000/#/isaac-gui?id=user-pane and see that it appears far from the anchor.
The only difference between the two pages is the images being included or not.
-Mitch
The text was updated successfully, but these errors were encountered: