Closed Bug 1780154 Opened 2 years ago Closed 2 years ago

Consider scroll-snap-type:proximity in ScrollSnapUtils::GetSnapPointForResnap

Categories

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

defect

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: hiro, Assigned: hiro)

Details

Attachments

(1 file)

This is the cause of bug 1779909 comment 12.

The root cause here is that in this else branch. We unconditionally set snap flag to true in the branch so that we consider the snap target element is a valid last snap target even if we won't snap to the position, thus when a re-snapping happens we try to snap the original snap position.

If we return the snap target in such cases, even though the target position is
unchanged from the original scroll destination, the target will be handled as a
valid last-snapped target element, thus we will try to re-snap to the element's
scroll-snap-align position rather than keeping the scroll position as it is.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/68caee424b21
Skip returning the snap target if the scroll-snap-type on the axis is `none`. r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35215 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: