document.scrollingElement.scrollTop is incorrect
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox66 wontfix, firefox67 fixed, firefox68 fixed)
People
(Reporter: nolan, Unassigned)
References
(Regression, )
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
- Go to http://bl.ocks.org/nolanlawson/raw/49f699da886a40647fa160814e6a44d6/
- Scroll down to the bottom of the page
- Check
document.scrollingElement.scrollTop
Actual results:
document.scrollingElement.scrollTop
returns 37 (pixels), which is very inaccurate. Chromium 73 reports 2137.14 on the same device (OnePlus 5T running Android 8.1.0).
Also note that the fixed element doesn't stay fixed to the bottom of the page for some reason, although that may be unrelated.
Expected results:
document.scrollingElement.scrollTop
should return the number of pixels representing the actual scrollTop.
Note that this may be a regression in Firefox v65, because I did not observe this bug in Firefox v64.
Reporter | ||
Comment 1•5 years ago
|
||
My mistake; this bug repros for me in Firefox v66, not v65.
Comment 2•5 years ago
|
||
Hi, I can confirm your issue is reproducible on latest Nightly 68.0a1 (2019-04-09)and Release 66.0.2.
Devices:
- Nexus 6P (Android 8.1.0);
- OnePlus 5T (Android 9);
- OnePlus Two (Android 6.0.1).
Additionally, I tried to take a regression range but I wasn't able to find a good build.
Comment 3•5 years ago
|
||
James, any idea why document.scrollingElement.scrollTop
would be so wrong in Fennec and GV?
P3 because this is not a new bug.
Weird. Botond, any ideas? Surely we have tests for this?
Comment 5•5 years ago
|
||
This works fine for me on a XZ1C running Fennec Nightly. Nolan, can you clarify which browser, version and device you're using?
Comment 6•5 years ago
|
||
Works fine on a recent Fenix on a Pixel 2 as well.
Reporter | ||
Comment 7•5 years ago
|
||
I can still reproduce the bug. Here is what I'm using:
Device: OnePlus 5T
Android: 8.1.0
Firefox: 66.0.2
Comment 8•5 years ago
•
|
||
document.scrollingElement.scrollTop
reports the layout viewport offset, so this is going to be affected by recent changes related to viewport sizing. Likely the behaviour on this page was regressed by something and then fixed by something.
Updated•5 years ago
|
Comment 9•5 years ago
•
|
||
The regressing bug is bug 1423013.
There is no more status-firefox65 flag but Firefox 65 is unaffected.
Updated•5 years ago
|
Comment 10•5 years ago
|
||
The fixing bug is bug 1525948.
Comment 11•5 years ago
|
||
This issue is fixed in Firefox 67 (currently in beta). 66 is already released, so not much we can do about it unfortunately.
Comment 12•5 years ago
|
||
(In reply to Nolan Lawson from comment #0)
Also note that the fixed element doesn't stay fixed to the bottom of the page for some reason, although that may be unrelated.
(This has the same root cause, and is also fixed in Firefox 67.)
Updated•2 years ago
|
Description
•