Open Bug 1992713 Opened 9 months ago Updated 9 months ago

Implement HasBeenScrolledByUser

Categories

(Core :: DOM: Navigation, enhancement)

enhancement

Tracking

()

People

(Reporter: keithamus, Unassigned)

References

()

Details

Attachments

(1 file)

We currently use HasBeenScrolled(<generation>) but this is not per spec, which expects a boolean of HasBeenScrolledByUser to denote some notion of whether or not the viewport has been scrolled by user gesture (rather than compositor or script). However https://github.com/whatwg/html/issues/11732 should be resolved before we change our implementation.

No longer depends on: 1955947
Depends on: 1955947
Type: defect → enhancement

From a comment in the spec issue;

For example, Chromium does not count three kinds of scrolling as "explicit" scrolls: kClamping, kAnchoring, and kScrollStart

I assume that

a) kClamping means clamping the scroll position when the scroll range gets shrunk for some reason and the scroll position becomes out of the range of the new scroll range
b) Anchoring means scroll position adjustments by scroll anchoring
c) kScrollStart means the concept of "setting where scroll starts in the scroll snap level 2 spec

(Though I am not particularly sure c) just means the concept in the scroll snap level 2 since scroll position change can happen without the level 2 implementation. I will attach a test case later.)

Excluding these ones makes sense to me. Note that the first two cases won't happen without any scroll position change in the past, but c) changes the scroll position, so a possible scenario is e.g. c) happens and a) or b) happens.

So for a reference I am going post links to our code where these three cases happen;

Here is an example that scroll snap properties make the initial scroll position non-zero when the document is loaded.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: