Alignment of headings wrong when scrolling

Created on 22 April 2022, over 2 years ago
Updated 17 August 2024, 4 months ago

Problem/Motivation

If I click on the table of content the body scrolls to the exact location of the heading. However if I scroll down the document the highlighted headings do not match with the table of content. I'm not sure if this just applies to very long documents.

🐛 Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom mistergroove

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I have this problem with content containing images using lazy loading, has anyone found a solution to this problem?

  • 🇫🇷France mably

    We just released the ToC NG module which is a fork of this module (ToC.js).

    This module was developed as a proof-of-concept for our own needs. We decided to share it with the community.

    We rewrote most of the Javascript code and the heading positions are recalculated on scroll, it should probably fix your problem.

    Feel free to test it and tell us how it goes.

  • 🇫🇷France mably

    It has probably been fixed in the new 3.0.x-dev version.

  • 🇫🇷France flocondetoile Lyon

    And this depends a lot of the front theme used (sticky navigation bar, etc. etc.) I guess.

  • Status changed to Postponed: needs info 4 months ago
  • Status changed to Closed: cannot reproduce 4 months ago
Production build 0.71.5 2024