Skip to content

Infinite scroll loop in docs / navtree #2133

Description

@NicoZweifel

Summary

The site started infinitely scrolling, basically spazzing out when navigating. It originates from navtree.js, which is part of doxygen. It is a known issue and is apprently fixed in 1.11.0.

 const gotoAnchor = function(anchor,aname) {
    let pos, docContent = $('#doc-content');
    let ancParent = $(anchor.parent());
    if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle')  ||
        ancParent.hasClass('fieldname')   || ancParent.hasClass('fieldtype') ||
        ancParent.is(':header')) {
      pos = ancParent.position().top;
    } else if (anchor.position()) {
      pos = anchor.position().top;
    }
    if (pos) {
      const dcOffset    = docContent.offset().top;
      const dcHeight    = docContent.height();
      const dcScrHeight = docContent[0].scrollHeight
      const dcScrTop    = docContent.scrollTop();
      let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop));
      animationInProgress = true;
      docContent.animate({
        scrollTop: pos + dcScrTop - dcOffset
      },Math.max(50,Math.min(500,dist)),function() {
        window.location.href=aname;
        animationInProgress=false;
      });
    }
  }

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.flecs.dev/flecs/md_docs_2Systems.html#threading
  2. Click on any nav link and scroll with the mouse wheel or click another one

See also here (music warning):

20260611-0951-23.1566316.mp4

Solution

Update doxygen.

I am not familiar with doxygen or what is needed to migrate and don't really have the time to get into it now but thought I'd leave this here anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions