Skip to content

Last Table of Contents item is never reached - #3863

Open
andy-mair-ons wants to merge 4 commits into
mainfrom
table_of_contents_last_section_active
Open

Last Table of Contents item is never reached#3863
andy-mair-ons wants to merge 4 commits into
mainfrom
table_of_contents_last_section_active

Conversation

@andy-mair-ons

@andy-mair-ons andy-mair-ons commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

See https://officefornationalstatistics.atlassian.net/browse/ONSDESYS-924

Adds scroll listener to detect scroll bottom and set last section active
Uses scrollEndThreshold param to decide how close to bottom last section should trigger active
Uses requestAnimationFrame to keep scroll listener in sync with browser frame rendering

How to review this PR

Describe the steps required to test the changes (include screenshots if appropriate).

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@andy-mair-ons andy-mair-ons self-assigned this Jun 23, 2026
@andy-mair-ons andy-mair-ons added the Enhancement Change of existing feature label Jun 23, 2026
@andy-mair-ons
andy-mair-ons requested a review from a team as a code owner June 23, 2026 11:58
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jun 23, 2026 2:54pm

@sveltifier sveltifier changed the title Table of contents last section active Last Table of Contents item is never reached Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Change of existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants