Skip to content

[cssom-view] Should scrollend fire when a scroll hits the end of a scroll container #7927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dlrobertson opened this issue Oct 20, 2022 · 5 comments

Comments

@dlrobertson
Copy link
Member

§ 3.1. Scrolling states:

Once the position has finished updating, emit the scrollend event.

and § 13.2. Scrolling states:

A scrollend event target is added to the Documents pending-scrollend-event-targets on scroll completed, which is defined as:

Scroll is completed when the scroll position has no more pending updates or translations and the user has completed their gesture.

It is not entirely clear to me what should occur when no more scrolling or translations can occur in the direction of the users scroll direction. For example, (based on my reading of the spec) a scroll container with overscroll-behavior: none and a pan gesture that hits the boundary should trigger a scrollend when the gesture completes (once the user lifts their fingers) and the boundary has been hit. I tested this on chromes implementation of scrollend with this example https://dlrobertson.com/examples/scrollend-event.html, and it appears that the scrollend is delayed. Do we include the momentum phase of a pan gesture in the definition of a "user gesture"? Also, should a scrollend be fired for a user scroll for which no scroll can occur?

Feedback on additional info that is nice to have when raising spec questions would be greatly appreciated 😄

@dlrobertson
Copy link
Member Author

669f10d looks like it answers most of this.

@dlrobertson
Copy link
Member Author

The wpt test dom/events/scrolling/scrollend-event-fired-to-element-with-overscroll-behavior.html seems to conflict with 669f10d. AFAIK no translations are applied and no scrolling occurs due to overscroll-behavior-y: none, but the test expects a scrollend event to occur.

CC @argyleink

@argyleink
Copy link
Contributor

AFAIK no translations are applied and no scrolling occurs due to overscroll-behavior-y: none

confirmed, that test needs an update 👍🏻

@dlrobertson
Copy link
Member Author

Test change is posted here

@dlrobertson
Copy link
Member Author

This can be closed now that web-platform-tests/wpt#36681 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants