#2133·flecs

Infinite scroll loop in docs / navtree

Author: NicoZweifelCreated Jun 11, 2026Updated Jun 25, 2026
Labelsdocumentation

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.

javascript
 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):

https://github.com/user-attachments/assets/7ecf6b5e-9275-4523-8f6e-6d17a6ea6c11

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.