Table of contents should be sticky

Bug #1913971 reported by Thomas Luzat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Manpage Repository
New
Undecided
Unassigned

Bug Description

When scrolling down with visible table of contents (larger viewport sizes) on pages such as

http://manpages.ubuntu.com/manpages/hirsute/en/man1/ssh-keygen.1.html

the table of contents moves out of view which complicates navigation. I propose adding CSS similar to the following:

#toc {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow: auto;
}

This makes the ToC stick in position for current browsers. Additionally, large ToCs become scrollable, which may be required if the TOC doesn't fit the screen, like on

http://manpages.ubuntu.com/manpages/hirsute/en/man1/rsync.1.html

For old browsers not supporting some of the properties, this should break pretty gracefully.

A nice addition would be to highlight the currently visible section(s), but this would be a separate feature and probably require a bit of JS.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.