-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Instant navigation: TOC items on visited pages require two clicks #7924
Comments
Thanks for reporting. I can reproduce the issue. We'll look into it. |
Okay, I think I've isolated the problem. The pipeline that is in effect when a document was loaded (initial load, or subsequent instant load) always resubscribes to location changes after this happened, in order to detect anchor-only changes (clicking a link in the TOC). I assumed that we need a two-layer subscription here, first filtering on the pathname (= page navigation), and then filtering on the hash fragment (= anchor navigation). This doesn't seem to be true, since removing the first part of the pipeline fixes the issue, as the pathname navigation already happened when the document observable emitted. We seem to be good just filtering distinct hash fragments. It might turn out not to be true once we release this fix, with some other issue re-appearing, but my current guess is that it should be fine. This is also exceptionally hard to test, since browsers are different. Fixed in 07a434b. |
@Nerixyz could you please confirm that this fixes your issue? |
I created a fresh venv, installed the version with the fix with |
Thanks for confirming. Keeping open until released. |
Released as part of 9.6.0. |
Context
This is very similar to #7183, except that the user doesn't navigate back to the main page but clicks a heading on the visited page, which requires two clicks.
Bug description
When
navigation.instant
is enabled, jumping to headings using the TOC on "new"/"child" pages requires two clicks.Related links
Reproduction
9.5.50-instant-navigation-bug-2.zip
Steps to reproduce
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: