scrollTop of BODY always 0 when HTML element has overflow: hidden
Reported by m...@michieldewit.nl, Aug 2 2016
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Example URL: https://jsfiddle.net/michieldewit/vLbx882u/4/ Steps to reproduce the problem: 1. Open https://jsfiddle.net/michieldewit/vLbx882u/4/ 2. Scroll the result panel down 3. Notice the scrollTop property of the BODY element remains 0 What is the expected behavior? The scrollTop property should indicate the current scroll position. It works like this in for instance Firefox What went wrong? The problem seems to be related to the overflow: hidden CSS in the HTML element in combination with the 100% height on both HTML and BODY. Does it occur on multiple sites: Yes Is it a problem with a plugin? N/A Did this work before? No Does this work in other browsers? Yes Chrome version: 51.0.2704.106 Channel: stable OS Version: Ubuntu 15.10 Flash Version: Shockwave Flash 22.0 r0 I tried this in various older versions and it seems this never worked. The problem occurs on https://start.me as well.
Aug 3 2016,
Jun 21 2017,
Jun 22 2017,
Fixed by ScrollTopLeftInterop.
Sign in to add a comment