-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Instant loading does not work with section anchors in Safari #3797
Comments
Thanks for reporting. The |
Ah yes I was testing with the readthedoc theme but couldn't make it to apply not sure why. Fixing it |
Thanks! Instant loading is a feature of Material for MkDocs. The |
I'm not able to reproduce what you are describing. Anchors within the page, as well as anchors between pages work for me: Ohne.Titel.mp4Please provide a screencast and explain exactly what you're observing. Either I'm not yet understanding the issue you're reporting, or it does not reproduce. Note that I only have Safari 15.2 on my hands, so it might be related to that. Furthermore, when you encounter the issue, please open the console and check if an error occurred. It might also be related to something entirely different, i.e. an error in third-party JavaScript. |
Enregistrement.de.l.ecran.2022-04-04.a.19.44.47.mp4 |
Thanks for providing the screencast! Unfortunately, it's still not reproducible for me.
|
You can see the console in the screencast, nothing special. |
I meant the browser's console 😉 Sorry for not being clear. |
Ah sorry ! Nothing in the console |
Were you able to reproduce the issue ? |
Unfortunately not. I've tested with 7.0.0 and 8.2.8 (latest). Both are working fine. Here's a screencast with 8.2.8.: Ohne.Titel.mp4I'm afraid I can't put any more time into this issue, it just does not reproduce for me. I tried everything. If other users are having the same problem in the future, maybe we can find a way to create a reproduction, but this one just doesn't do it. Note that I'm running Safari 15.2 (not the latest 15.4), so it might be related to that, but until now it seems you're the only one with this problem. I'm closing this issue as not reproducible for now. |
So you're not even trying to reload the page and see if it gets to the anchor ? That's what I explain in my screencast It might be an issue with Safari 15.4 I guess. |
Oh, sorry, I missed the reload. It wasn't apparent in your screencast and you did not mention it explicitly. I can reproduce it when reloading. Reopened. I'll look into it when I find some time! |
So, a heads up: I'm aware of this issue, but solving it turns out to be very complex. I'm going to take this as an opportunity to refactor instant loading, which definitely needs to be simplified, also solving the issue at hand. However, I need to find enough time to do this, so I currently can't put an estimate on when this will be fixed. In the meantime, disabling instant loading is a good workaround. |
That’s what I did. Thanks for looking into this ! |
“So, a heads up: I'm aware of this issue, but solving it turns out to be very complex. I'm going to take this as an opportunity to refactor instant loading, which definitely needs to be simplified, also solving the issue at hand. However, I need to find enough time to do this, so I currently can't put an estimate on when this will be fixed. In the meantime, disabling instant loading is a good workaround.” — squidfunk/mkdocs-material#3797 (comment)
#5032 contains a refactoring of instant loading. I'm not sure that it's finished yet, but if you find some time for testing, that would be amazing. You can install it with:
|
I've had
I didn't have time to thoroughly regression-test or anything. |
The issues should be fixed in #5023. I've taken the time and did a complete rewrite of instant loading. It should be much more stable now. I'll issue a new release shortly, so we can find any remaining bugs quickly, but I'm quite confident that scroll restoration should work much better now. I've tested in Chrome, Firefox and Safari. |
Released as part of 9.1.1. |
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
Beginning with version 7.0.0 anchors defined on headings do not work with Safari 15.4 macOS
Expected behaviour
Clicking the the link on the TOC should jump to the section in the main content
Using a URL with # anchor should open the page at the location.
Actual behaviour
Page stays on top
Steps to reproduce
Run website and click on a H3 link on the right side
Package versions
Python 3.8.7
mkdocs, version 1.1.2 from /usr/local/lib/python3.8/site-packages/mkdocs (Python 3.8)
7.0.0
Configuration
System information
The text was updated successfully, but these errors were encountered: