document.body.scrollTop is always zero
Reported by
thinkol...@gmail.com,
Nov 16 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38 Steps to reproduce the problem: 1. Chrome 62 open www.youtube.com; 2. scroll youtube page; 3. open DevTools Console; 3. input document.body.scrollTop; 4. output is always zero; but, document.body.scrollTop is change of Chrome 58. What is the expected behavior? What went wrong? document.body.scrollTop is always zero. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 62.0.3202.94 (正式版本) (64 位) Channel: n/a OS Version: OS X 10.12.6 Flash Version: 27.0.0.187
,
Nov 17 2017
Maybe this? > Intent to Ship: [ScrollTop/Left Interop] document.scrollingElement == document.documentElement https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/X64Sg16RhT4/6ZiW7Dt8CAAJ Could you try document.documentElement.scrollTop instead of document.body? There are lots of the same questions outside Chrome, e.g. you can find one at stackoverflow. https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js If you are sure this is any regression, any standards violation or interoperability issue with other browsers, feel free to reopen. |
||
►
Sign in to add a comment |
||
Comment 1 by manoranj...@chromium.org
, Nov 16 2017