opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Scrollspy fails to activate last section at page bottom

Open arjuxn opened this issue 3 days ago • 0 comments

Description

The "On this page" (scrollspy) navigation does not highlight the last heading when scrolling to the bottom of the page.

All other sections are highlighted correctly while scrolling, but the final section ("Customize") never becomes active.

Expected behavior

The last heading should become highlighted in the "On this page" navigation when it is the current section being viewed.

Actual behavior

The previous section remains highlighted even when the last heading is clearly visible on screen.

Additional context

It appears the scrollspy logic updates the active section only after a certain scroll threshold is reached. Since the page ends shortly after the last heading, that threshold is never met.

Plugins

N/A

OpenCode version

N/A (documentation website)

Steps to reproduce

Steps to reproduce

  1. Open the documentation page
  2. Scroll down slowly through the content
  3. Observe the "On this page" navigation updating correctly for each section
  4. Reach the bottom of the page where the last heading ("Customize") is visible

Screenshot and/or share link

https://opencode.ai/docs/#customize

Image

Operating System

Windows 11

Terminal

N/A

arjuxn avatar Jan 11 '26 07:01 arjuxn