On documents where the table of contents is long enough (or the window is short enough) the TOC is still 'fixed' in place and the overflowed portions are inaccessible.
One way this can be solved is an accordion approach utilized by Bootstrap. Although they don't solve the overflow problem directly, they limit the chances of it happening by collapsing the ToC.
On documents where the table of contents is long enough (or the window is short enough) the TOC is still 'fixed' in place and the overflowed portions are inaccessible.