Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic scrolling in longer pages on Desktop-Version of Firefox #9

Open
Mx7ca opened this issue Aug 4, 2023 · 1 comment
Open

Comments

@Mx7ca
Copy link

Mx7ca commented Aug 4, 2023

Hello,
In Firefox, I've got the problem that when visiting a docs-page longer than my Screen, the documentation starts scrolling down. If I scroll up, it automatically scrolls down again. That way it's difficult to read the whole page.

Workaround: Use the Firefox Reader View

Test Browser: ManjaroLinux 23.0.0 with KDE, Firefox 115.0.2

pages that show this behavior:

Other Browsers I've tested:

  • ManjaroLinux 23.0.0 with KDE, Chromium 115.0.5790.110: It works as expected 👍
  • Ubuntu 22.04.2 with KDE, Firefox 114.0.2: It doesn't work 👎
  • LineageOs 20-20230724-NIGHTLY-FP3, Fennec 115.0.0: It works as expected 👍
  • LineageOs 20-20230724-NIGHTLY-FP3, Firefox 116.0: It works as expected 👍

So it seems that this issue only occurs on the Desktop Version of Mozilla Firefox.

Maybe somebody with a Windows or MacOS can confirm this issue for Firefox on non-Linux Desktops?

@Mx7ca
Copy link
Author

Mx7ca commented Aug 4, 2023

Using the Firefox Debugger and stepwise execution, I've found out that the issue is caused by
ll. 189 (Github-Source):

        function scrollTo(el) {
            clearTimeout(timeout);
            timeout = setTimeout(() => {
                try {
                    el.scrollIntoViewIfNeeded();
                } catch (e) {
                    el.scrollIntoView();
                }
            }, 500);
        }

The Try-Block causes a TypeError: el.scrollIntoViewIfNeeded is not a function. The Catch-Block then scrolls down a bit.
This function is executed 4 times, so it scrolls down 4 times.

I hope this info helps. Unfortunately, I'm not familiar with Javascript, so I'm not able to offer more info.

PS: The only Firefox Addon that I'm using is "UBlock Origin". I've disabled it temporarily, but the problem still occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant