-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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:
- The selection menu for an animint is open.
- The selected value/s for the variable change/s while you are on the webpage.
- Your viewport is below the selection menu (so you don't see the animint or the selection menu anymore).
- 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.
- 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:
- Hide the selection menu, or
- Pause the animation (under animation controls), or
- 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:
- The selected values visibly changing on the webpage, or
- 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;
graph LR;
unknown_variable-->scrolling_bug;
unknown_variable-->changing_values;