-
-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Description
Hello!
We are running into an issue with table of contents after updating to 4.33.0.
Current behavior
- Click on a link in the table of contents.
- Scroll past it up or down, the highlight is fixed on the one link I clicked.
Expected behavior
- Click on a link in the table of contents.
- Scroll past it up or down, the highlight should change based on what anchor is in view.
I narrowed the issue down to the following
I am using yarn -> yarn add tocbot@https://github.com/tscanlin/tocbot#b5b25013dfcce37621e6f930660f1b9e70df5c42
Using Javascript to initialize tocbot,
tocbot.init({
tocSelector: ".js-toc",
positionFixedSelector: ".js-toc",
contentSelector: ".docs-content",
headingSelector: "h2, h3, h4",
collapseDepth: 6, // Uncollapse all headers.
// These should match our header-offset CSS variable.
// header-offset = 4rem = 64px
headingsOffset: 64,
scrollSmoothOffset: -64,
});
Metadata
Metadata
Assignees
Labels
No labels