padloc / docs

Docs and resources for the Padloc password manager
https://docs.padloc.app
GNU Affero General Public License v3.0
1 stars 0 forks source link

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

Open Mx7ca opened 1 year ago

Mx7ca commented 1 year ago

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:

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 commented 1 year ago

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.