Hello blink devs,
About a year ago, I advocated for a change in Blink to stop reporting +0 values for body.scrollTop (unless the body itself was not overflow:visible), and simultaneously start reporting +0 values for document.documentElement.scrollTop instead. I advocated the same change for setters as well.
This change brought Blink in line with FF and IE and the actual HTML5 spec.
Unfortunately, this broke several "designed for Blink/ WebKit" only sites, including several built in chrome pages.
The change was partially reverted so that both body and documentElement returned >0. This fixed the blink only sites but broke a few sites that we're working around the original browser discrepancy by doing "body.scrollTop + documentElement.scrollTop".
The change was then hidden behind an experimental flag and a use counter was implemented to attempt to gauge this behavior. The canonical "solution" became "documentElement.scrollTop || body.scrollTop".
However, this leaves Blink with a fundamentally flawed behavior that is only enabled experimentally with a use counter that really can't detect improper usage.
Since that time, the chrome internal pages I believe have fixed themselves, and any work to move this forward further has stalled.
I'd love to get to a place where Blink can simply implement the spec, which will put it in line with FF and IE, and not force developers to hack the solution in, while leaving libraries like jQuery with no way to actually determine what the state of the page is.
The current behavior (without experimental flags on) leaves libraries with no way to detect if a body is scrolled independently of a window. The experimental behavior suffers the same fate with the added badness of thinking the window AND body is scrolled regardless if only the window OR body is scrolled.
How can we determine when and if to move forward to the spec compliant behavior?
See the following bugs for some history:
Thanks for your time and attention!