Open Bug 1866670 Opened 1 year ago Updated 1 year ago

Page down scrolls too far on some pages with headers

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

Firefox 120
defect

Tracking

()

People

(Reporter: gutnablah-bugz, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0

Steps to reproduce:

(NB: I'm unable to comment on Bug 780345, because its status is "RESOLVED FIXED", but my issue appears to be basically identical.)

A beautiful example to reproduce the bug can be seen at (ironically): https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/120
Simply load the page, note what is at the bottom of the page, and hit page down once.

Hitting page down one time from the top of the page moves the content too far...
(This same page does the right thing in Chrome.)

Actual results:

Content at bottom of screen before page down is moved beyond the top of the screen after page down, meaning that a couple of lines of text are not readable without scrolling back up.

Expected results:

Content at bottom of screen before page down should have moved to just below the top of the screen after page down.

I can reproduce the issue on Nightly122.0a1 windows10.

This seems to be a problem with the handling of position: sticky; elements when determining the amount of page scroll.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core

My best guess is that the sticky element in the site is NOT stuck at where the scroll position is (0, 0), thus we fail to detect it as a sticky element here.

Status: UNCONFIRMED → NEW
Ever confirmed: true

If my guess is correct, this is a dup of bug 1658159, I think.

See Also: → 1658159

(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)

If my guess is correct, this is a dup of bug 1658159, I think.

I strongly suspect you're right (I hadn't found that bug in my searching, just a few closed ones).

Would this mean that the right fix would be some kind of enhanced detection in nsGfxScrollFrame.cpp?

The severity field is not set for this bug.
:hiro, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)
Severity: -- → S3
Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.