Scroll Anchoring in Firefox 66
hacks.mozilla.org
hacks.mozilla.org
The symptom is that it treats the scrollbar position as a ratio of page length, and as the page length changes, the viewport is suddenly warped to a new position at the same ratio of the new page size. To fix this, I think it should continue to use the old page length to calculate scroll position until you release the drag. You won't always be able to scroll past the previous end of page in one movement, but the content visible in the viewport should remain coherently related to your drag motions.
I recognize that something has to be made inconsistent in the ratio-based scrollbar UX if the page length changes. I think having the scrollbar handle jump away from the mouse cursor on drag-release would be much less annoying than having the viewport jump around on each DOM edit. You can continue reading what you were reading and only be distracted when you need to go find the handle again to scroll further down, much like if you accidentally let your mouse drift out of the scrollbar and then released the drag.
It's not that sites are intentionally scrolling ads into view. In the rare cases where they do that, scroll anchoring won't make any difference anyway. Usually what happens is that the content just changes position randomly, whether or not the ad is even within the viewport.
Now people largely ignore them, use publishing tools that don't bother, and dynamically build pages with garbage scripts instead of having a sane document already marked up.
I need one more thing. Prevent the same jump up/down behavior when using infinite scoll. E.g. if you use scoll bar to scroll down, new content apprearing changes the page height, making the scroll bar recalculate its position, and the whole thing jumps.
Likewise, when I press the browser back button tp go back to the page with infinite scroll, it is only hard to find the point on that oage where I was.
Good work nonetheless.
No because I use ad blockers religiously.