Page MenuHomePhabricator

When scrolling down on a page with many sections, the ToC should scroll with you
Open, MediumPublicFeature

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • When you scroll past the lowest section title that is visible in the ToC, the ToC doesn't scroll with you, unless you actively scroll inside the ToC container

What should have happened instead?:

  • When the section header in the ToC changes (e.g. when activaveSection() runs, it should also scroll the ToC to that section.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Change #1290821 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/skins/Vector@master] Scroll the TOC along with the page scrolling

https://gerrit.wikimedia.org/r/1290821

HFan-WMF triaged this task as Medium priority.Jul 1 2026, 5:33 PM
HFan-WMF moved this task from Incoming to Needs refinement on the Reader Experience Team board.
HFan-WMF added subscribers: Sneha, HFan-WMF.

I really love this proposal, Jon. Without introducing this behavior, it's actually hard for the reader to even notice that there are further sections in the ToC when they have scrolled past the bottom one that's automatically preloaded. @Sneha let's review this behavior from a design standpoint and tackle the code review in an upcoming sprint!

Yes really good find and will be a good improvement. I am surprised we don't do this already. May be it didn't come to our attention as you don't encounter this situation on articles as often unless you have all the sub sections also visible.

Hi! I've claimed this task and I'm currently setting up my development environment. I noticed there's an existing patch associated with the task, so I'll first review the current implementation and any feedback before working on improvements. Please let me know if there's any specific area you'd like me to focus on. Thank you!