Open Bug 1414874 Opened 7 years ago Updated 5 months ago

When page-scrolling on pages with position: sticky items, reduce page scroll amount to maintain visible overlap

Categories

(Core :: Layout, defect, P3)

54 Branch
defect

Tracking

()

People

(Reporter: yoasif, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20171106100122 Steps to reproduce: 1. Navigate to https://belen-albeza.github.io/scroll-demos/sticky.html 2. Use spacebar or pagedown to scroll Actual results: The position scrolled to does not contain any of the previous page. Expected results: New position after scroll should show the last line or two of text in the previous page. See video; Chromium does this correctly. In Firefox, highlighted the word "voices", which does not appear in new scrolled position; in Chrome, highlighted "where", which appears in the new scroll position.
Component: General → XUL
Component: XUL → Panning and Zooming
We should probably deal with this the same way we do fixed-pos items. That is, in the function at [1], figure out if there are any sticky elements attached to the edges of the viewport (zero-margin sticky elements) and that are in their "sticky" mode, and deal with the same way as the fixed items. [1] http://searchfox.org/mozilla-central/rev/5a60492a53667fc61a62af1847d005a210b7a4f6/layout/generic/nsGfxScrollFrame.cpp#4216
Component: Panning and Zooming → Layout
See Also: → 1327869
Summary: position: sticky scroll upon pagedown does not scroll to the right place → When page-scrolling on pages with position: sticky items, reduce page scroll amount to maintain visible overlap
Sorry guys, apparently Chrome *doesn't* do this correctly, but that's not a reason why Firefox shouldn't. :)
Priority: -- → P3
Keep in mind interactions with impending 'scroll-padding' -> https://www.w3.org/TR/css-scroll-snap-1/#scroll-padding
CSSWG desicion about scroll-padding interactions with heuristics of keypress scrolling -> https://github.com/w3c/csswg-drafts/issues/2929
See Also: → 1658159, 1462235
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: