Steps to replicate the issue (include links if applicable):
- Go to a page with a long ToC (e.g. https://www.mediawiki.org/wiki/ORES/FAQ on an 1920x1080 screen, with the ToC subsections opened), with the ToC panel opened in the sidebar
- Try to scroll to the bottom of the ToC panel
What happens?:
Once you reach the bottom of the ToC panel, the scrolling "overflows" to the main area (this is standard scrolling behavior for at least Chrome: when you reach the bottom of a given panel with overflow:scroll, the closest parent with overflow:scroll continues to be scrolled). As soon as the page gets scrolled, the ToC gets repositioned to bring the active section into the visible area. This results in weird and very annoying scrolling behavior.
What should have happened instead?:
The ToC should not be repositioned when the scroll event was initiated from the ToC panel, not the main article area.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):