Closed Bug 1536717 Opened 5 years ago Closed 5 years ago

document.scrollingElement.scrollTop is incorrect

Categories

(GeckoView :: General, defect, P3)

ARM
Android
defect

Tracking

(firefox66 wontfix, firefox67 fixed, firefox68 fixed)

RESOLVED DUPLICATE of bug 1525948
Tracking Status
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:

  1. Go to http://bl.ocks.org/nolanlawson/raw/49f699da886a40647fa160814e6a44d6/
  2. Scroll down to the bottom of the page
  3. 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.

My mistake; this bug repros for me in Firefox v66, not v65.

Version: Firefox 65 → Firefox 66

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Product: Firefox for Android → GeckoView
Hardware: Unspecified → ARM
Version: Firefox 66 → Trunk

James, any idea why document.scrollingElement.scrollTop would be so wrong in Fennec and GV?

P3 because this is not a new bug.

Flags: needinfo?(snorp)
Priority: -- → P3

Weird. Botond, any ideas? Surely we have tests for this?

Flags: needinfo?(snorp) → needinfo?(botond)

This works fine for me on a XZ1C running Fennec Nightly. Nolan, can you clarify which browser, version and device you're using?

Flags: needinfo?(nolan)

Works fine on a recent Fenix on a Pixel 2 as well.

I can still reproduce the bug. Here is what I'm using:

Device: OnePlus 5T
Android: 8.1.0
Firefox: 66.0.2

Flags: needinfo?(nolan)

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.

Flags: needinfo?(botond)

The regressing bug is bug 1423013.

There is no more status-firefox65 flag but Firefox 65 is unaffected.

Regressed by: 1423013
Keywords: regression

This issue is fixed in Firefox 67 (currently in beta). 66 is already released, so not much we can do about it unfortunately.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

(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.)

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.