Skip to content

TOC navigation scrolls to incorrect position #3263

@mikasaco

Description

@mikasaco

Issue description

When clicking an item in the left-hand Table of Contents (TOC) on form pages (e.g., Upstream, Route, or Service creation/edit pages), the page scrolls to a vertical position that does not align with the intended section.

For example:
when clicking "Upstreams-Add Upstream-Retry" on a screen with resolution 3840×2160, the page scrolls to the "Service Discovery" section instead.

This issue occurs consistently across all TOC-enabled forms and affects usability of the navigation feature.

Expected behavior

We need to navigate to the correct position when clicking the TOC.

How to Reproduce

  1. Go to Upstreams > Add New Upstream
  2. Click any item in the left TOC (maybe "Retry")
  3. Observe that the page scrolls to an incorrect item

Screenshots

Image

Environment

  • apisix-dashboard version: latest
  • Browser version: chrome 142.0.7444.176(Edge has the same problem)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions