Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TOC highlights the wrong section when current section is exiting the viewport #2020

Closed
lakshya0246 opened this issue Jun 28, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@lakshya0246
Copy link

Description

There's an issue in the Table of contents (TOC) on the right. If you click on a link in the toc, and scroll beyond the section, as you scroll, the TOC jumps to and highlights a link that is not in view, then comes back to the correctly highlighted link.

Reproduction

The issue can be observed on this page:
https://nextra.site/docs/docs-theme/theme-configuration

  1. Click on the link MDX Components in the TOC under Content
  2. The page scrolls to MDX Components. ✅
  3. But Global is still highlighted in the TOC. ❌
  4. Now scroll the page slowly up until MDX Components is about to exit the viewport from bottom. TOC jumps to Global. ❌

Tested on:

  • Chrome 114.0.5735.198
  • MacBook Pro 16
  • Viewport sizes : 976 x 1920 and 1000 x 1666
@dimaMachina
Copy link
Collaborator

please attach video, can't reproduce

@lakshya0246
Copy link
Author

lakshya0246 commented Aug 25, 2023

Sure, here's the video https://youtu.be/BMJGTuvsLjw

@dimaMachina
Copy link
Collaborator

Thank you! Will debug why this occurs

@dimaMachina dimaMachina added bug Something isn't working help wanted Extra attention is needed labels Aug 25, 2023
@dimaMachina dimaMachina mentioned this issue Aug 28, 2023
@dimaMachina
Copy link
Collaborator

should be fixed by #3249

@dimaMachina dimaMachina added this to the 3.0 milestone Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants