New issue
Advanced search Search tips

Issue 770192 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

document.body.scrollTop returns always 0

Reported by mstr...@googlemail.com, Sep 29 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Example URL:
You can use every page you want wich has a vertical scrollbar

Steps to reproduce the problem:
1. Open a web page with scrollable content
2. Scroll down
3. Type document.body.scrollTop in console 

What is the expected behavior?
document.body.scrollTop should return a value > 0 if you are not on top of the page

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

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 6.3
Flash Version: Shockwave Flash 27.0 r0

Tested on Windows. Chrome 59 working correctly.
 

Comment 1 by woxxom@gmail.com, Sep 29 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 it is 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