readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.78k stars 1.74k forks source link

Sidebar occasionally "stuck" when sticky navigation disabled #748

Open Oblarg opened 5 years ago

Oblarg commented 5 years ago

Problem

When "sticky navigation" is set to false, the sidebar occasionally will become "stuck" and refuse to scroll. This can reliably be induced by scrolling all the way to the top or bottom of the main page; once you hit either end, the sidebar locks and will not scroll. Usually it unfreezes itself within a few seconds, but the timing appears inconsistent.

It is always possible to force it to unfreeze by expanding and collapsing an element in the sidebar.

Reproducible Project

An example of a project in which this is currently occurring can be found here:

https://github.com/Daltz333/frc-docs https://frc-docs.readthedocs.io/en/latest/

Environment Info

jessetan commented 5 years ago

@Oblarg I can't reproduce this. Can you provide a gif or video of the behavior? What OS are you using?

What do you mean with "the sidebar locks and will not scroll"? Do you mean it does not scroll when you scroll the main content, or that it does not scroll when you try to scroll the sidebar itself?

Oblarg commented 5 years ago

I mean the latter. I'm using Windows 10.

GammaGames commented 5 years ago

I have also noticed this, I could get it to happen pretty often when I:

  1. Scrolled the sidebar
  2. Scrolled the main content
  3. Tried to scroll the sidebar again, couldn't until reload
jessetan commented 5 years ago

@GammaGames what OS and browser do you use?

Is there any output in the console when this happens?

GammaGames commented 5 years ago

elementary OS 5.0 (Built on Ubuntu 18.04.2 LTS) and Google Chrome 74.0.3729.131

I was able to reproduce the issue. If you scroll the content down a little bit before trying to scroll the sidebar, it won't scroll until the content gets to the top. There's no errors in the console.

Screen record from 2019-05-10 18 58 58

Oblarg commented 5 years ago

A few other things I've noticed that may help in debugging this:

The sidebar seems to get into one of two states. Either:

  1. The sidebar is stuck whenever the main content is not all the way at the top or bottom, or

  2. The sidebar is stuck whenever the main content is all the way at the top or bottom.

There does not appear to be much rhyme or reason to which of the two states it ends up in. In either case, there is a couple second delay between scrolling the main content out of the problematic position, and the sidebar unsticking. In either case, as well, the sidebar can be reliably unstuck by interacting with any elements in it (either collapsing or un-collapsing them), however it will usually rapidly get stuck again.

jessetan commented 5 years ago

Also can't reproduce with Chromium or Firefox on Ubuntu (VM). Any additional URLs (godot engine seems to have found a workaround with sticky nav) or OS/browser combinations would be appreciated

agjohnson commented 5 years ago

Ah, I noticed something similar with #835, mostly on Firefox, I'm not sure if I noticed on Chromium. Scrolling sometimes would pause on the flyout menu scrollable content. This could potentially be affected by the scrolling JS that we use, though I thought that JS only targeted the main nav bar scrollable content.