document.body.scrollTop is always zero
Reported by
wangwei8...@gmail.com,
Sep 12 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Steps to reproduce the problem: 1. open any web page that tall enough to show vertical scrollbar 2. scroll down a little bit 3. checkout document.body.scrollTop in console What is the expected behavior? document.body.scrollTop is a positive integer What went wrong? document.body.scrollTop is always zero Did this work before? N/A Chrome version: 60.0.3112.113 Channel: n/a OS Version: OS X 10.12.0 Flash Version: Shockwave Flash 26.0 r0 1) Reproduced in Windows Chrome "版本 61.0.3163.79(正式版本) (32 位)" 2) When upgrade from 60.0.3112.113 to 61.0.3163.79 bug occurred.(Win10) 3) Still can be reproduced in "Version 63.0.3213.0 (Official Build) canary"(64-bit). MacOS 10.12 4) Mac Chrome "Version 60.0.3112.113 (Official Build) (64-bit)" is good.
,
Sep 12 2017
document.documentElement.scrollTop is not zero in bugged version. That value is zero in non-bugged version.
,
Sep 12 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.
,
Sep 12 2017
Got it. I think this issue can be closed.
,
Sep 12 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by wangwei8...@gmail.com
, Sep 12 2017271 KB
271 KB View Download