Skip to content

Observations on a Scrolling Bug #90

@ampurr

Description

@ampurr

The Bug

In Firefox (but not in Edge), there's a curious scrolling bug where some webpages with some animints scroll up by themselves. It's like the webpage is possessed by an especially boring ghost.

You can experience it for yourself. Open Chapter 7 in the animint2 Manual in Firefox, scroll all the way down, and watch the webpage just slowly scroll up by itself.

Since it's browser-dependent, I'm actually not sure that this counts as a bug for animint2 instead of, say, Firefox. But this seemed to be the best place to document it, and I wanted to write down my observations before I forget them.

When Does the Bug Happen?

It seems to become visible when all these criteria are met:

  1. The selection menu for an animint is open.
  2. The selected value/s for the variable change/s while you are on the webpage.
  3. Your viewport is below the selection menu (so you don't see the animint or the selection menu anymore).
  4. Your viewport either does not contain the selection menu or is sufficiently far away from it. In other words, if your viewport is very close to the selection menu, the bug may not occur.
  5. If the webpage has more than one animint, your viewport does not contain all selection menus that change.

The Fix

How do you stop it from happening? Either:

  1. Hide the selection menu, or
  2. Pause the animation (under animation controls), or
  3. Change updates (under animation controls) to some absurdly large number—that way, you finish reading the webpage before the animint updates.

What's the Cause?

The scrolling seems to happen every time the selected value/s change. The quicker they change, the quicker the scrolling. The more they are, the faster the scrolling occurs. When they stop changing, the scrolling stops, too. Furthermore, the bug doesn't show itself on all browsers.

Therefore, it seems reasonable to conclude that the scrolling bug is caused by some combination of browser contribution and either:

  1. The selected values visibly changing on the webpage, or
  2. Some unknown variable that causes both the visibly changing values and the scrolling bug. (For example, maybe the JavaScript code causes it to happen.)
graph LR;
    changing_values-->scrolling_bug;
Loading
graph LR;
    unknown_variable-->scrolling_bug;
    unknown_variable-->changing_values;
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions