-
Notifications
You must be signed in to change notification settings - Fork 1.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
Navigation problems with singlehtml output #880
Comments
I was able to replicate this, the menu disappearing is weird |
To the best of my knowledge:
This affects some documentation in Debian, and I've provided a patch downstream in the relevant bugthread at https://bugs.debian.org/1075914 for that (although I'm not 100% certain whether it's the best way to fix this!). also, cc'ing @kebekus @nienn (because this seems similar to #1177 which I was reading before discovering this more-relevant bugreport) |
There is an exception to this: hyperlinks to the same Given that, I think my downstream patch is incorrect (and I've added a message to note that there). Instead of removing the Although I think it's worth being careful about side-effects, and would benefit from discussion, initially I lean towards the idea of adjusting this behaviour in Sphinx. In single-document Sphinx builds there isn't really a logical notion of current location within the graph of documents, so it might be valid to consider the root of the table-of-contents tree as the current location. |
If anyone from this thread has time to test the potential fix in #1588, I'd be grateful! Strictly speaking, it only resolves the second part of the reported navigation problems; selectively-quoting the relevant part of the bugreport:
|
Another call for review of #1588 if+when anyone has time. Here's a brief recap on the problem that the modification is intended to address:
The pull request in #1588 proposes a change that alters the CSS selector query used to attach the event handlers; instead of checking for a CSS classname of |
I have two, possibly related, issues with navigation when generating singlehtml output.
Firstly, when clicking on the top-level entry in the navigation bar, it does not automatically open to display the lower levels. Clicking on the [+] icon does. Clicking on lower level entries does automatically open them.
This is a relatively minor UI annoyance/inconsistency but it seems to also cause a major problem on small screens for mobile devices.
In this case, clicking on the menu icon at the top of the page displays the navigation bar. Clicking on a top-level entry goes to that location but does not close the menu. Worse, the menu icon has disappeared and it is impossible to hide the navigation bar. It seems it is not possible to scroll back to the top of the document.
The contents page can be redisplayed by either refreshing the page or by clicking on the [+] icon next to one of the top-level entries, then selecting a sub-entry. This correctly goes to that heading and closes the menu.
This makes singlehtml output unusable.
Reproducible Project
The attached example with an index file, a couple of content files and a minimal conf.py demonstrates the problem.
rst-files.zip
Error Logs/Results
The attached image files show:
Display for a mobile device with the menu icon
Navigation displayed (menu icon still visible)
After clicking on an entry (correct location displayed on right of page but hidden by navigation menu)
Environment Info
Running MacOS Catalina. Checked results in a couple of browsers (Chrome and Safari) with identical results.
The text was updated successfully, but these errors were encountered: