RESOLVED WONTFIX 83974
scrollTop value for body element always 0 if height is set
https://bugs.webkit.org/show_bug.cgi?id=83974
Summary scrollTop value for body element always 0 if height is set
Caleb Troughton
Reported 2012-04-14 01:49:14 PDT
I've attached a couple reduced test cases. In the failing test case the html element has overflow-x:hidden and the body has a height of 100%. Regardless of scroll position, body reports a scrollTop of 0 at all times. Removing either the overflow-x hidden on html or the height on body result in the body element reporting scrollTop correctly, as can be seeing in the working case. To reproduce: 1. Open failing-case attachment. 2. Scroll down any amount and click the Report scrollTop Values button. 3. Compare the results to the same steps using working-case attachment.
Attachments
Failing test case (907 bytes, text/html)
2012-04-14 01:50 PDT, Caleb Troughton
no flags
Working test case by removing height declaration from body element. (882 bytes, text/html)
2012-04-14 01:50 PDT, Caleb Troughton
no flags
Caleb Troughton
Comment 1 2012-04-14 01:50:19 PDT
Created attachment 137201 [details] Failing test case
Caleb Troughton
Comment 2 2012-04-14 01:50:49 PDT
Created attachment 137202 [details] Working test case by removing height declaration from body element.
j.j.
Comment 3 2015-03-08 19:24:33 PDT
seems a duplicate of bug 106133, see also bug 5991 comment 11
Ahmad Saleem
Comment 4 2022-08-10 17:11:47 PDT
RESULTS from "Failing test case" across all browsers: *** Safari 15.6 on macOS 12.5 *** BODY scrollTop: 0 HTML scrollTop: 0 *** Firefox Nightly 105 *** BODY scrollTop: 0 HTML scrollTop: 0 *** Chrome Canary 106 *** BODY scrollTop: 0 HTML scrollTop: 0 RESULTS from "Working test case..." across all browsers: *** Safari 15.6 on macOS 12.5 *** BODY scrollTop: 0 HTML scrollTop: 0 *** Firefox Nightly 105 *** BODY scrollTop: 0 HTML scrollTop: 0 *** Chrome Canary 106 *** BODY scrollTop: 0 HTML scrollTop: 0 ________ I am not sure whether spec changed or what but all browsers are not following web-spec but I am not able to reproduce and get same results across all browsers. As a result, I am going to mark this as "RESOLVED WONTFIX". Please reopen, if you think above results are wrong or I tested something incorrectly. Thanks!
Note You need to log in before you can comment on or make changes to this bug.