New issue
Advanced search Search tips

Issue 769438 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

document.body.scrollTop always returns 0

Reported by to.lufam...@gmail.com, Sep 27 2017

Issue description

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

Steps to reproduce the problem:
1. Open a Web page with a scrollbar (e.g. search for results on google)
2. Open the developer console and type document.body.scrollTop. It will show 0.
3. Scroll the page a bit. Type document.body.scrollTop again in the developer console. It still shows 0. 

What is the expected behavior?
document.body.scrollTop should return the number of pixels an element is scrolled veritcally.

What went wrong?
document.body.scrollTop always returns 0

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

Chrome version: 61.0.3163.100  Channel: stable
OS Version: OS X 10.11.6
Flash Version:
 

Comment 1 by woxxom@gmail.com, Sep 27 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)

Sign in to add a comment