New issue
Advanced search Search tips

Issue 739332 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 737633
Owner: ----
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

document.body.scrollTop reporting a wrong value

Reported by hau...@pusher.com, Jul 5 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3147.0 Safari/537.36

Steps to reproduce the problem:
1. Go to https://codesandbox.io/s/RgpWLp2ER in Canary.
2. Read the text in the rendered website and scroll down and click the button.
3. The text will be updated to say that the value of scrollTop when the button was clicked was 0. This is incorrect, and you can see that it works correctly on the latest non-Canary Chrome.

What is the expected behavior?
document.body.scrollTop should give a non-zero value when the page is scrolled down.

What went wrong?
document.body.scrollTop gives a value of zero when the page is scrolled down.

Did this work before? Yes Version 59.0.3071.115 (Official Build) (64-bit) - Mac

Does this work in other browsers? Yes

Chrome version: 61.0.3147.0  Channel: n/a
OS Version: OS X 10.11.6
Flash Version:
 

Comment 1 by woxxom@gmail.com, Jul 5 2017

Duplicate of  issue 737633 , apparently.

>This is done on purpose. To support interop with other browsers the scrolling element has become the documentElement in standards mode. In some cases is it the body element in quirks mode. See the intent to ship here: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/X64Sg16RhT4/6ZiW7Dt8CAAJ

>Really you should be using document.scrollingElement to be told what the scrolling element is. This attribute was added for interop ability.
Mergedinto: 737633
Status: Duplicate (was: Unconfirmed)
Yep.

Sign in to add a comment