Intent to Ship: Scrollend Event

191 views
Skip to first unread message

David Awogbemila

unread,
Mar 31, 2023, 9:50:04 AM3/31/23
to blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle

Contact emails

arg...@google.comawogb...@google.com

Explainer

https://github.com/argyleink/scrollend-explainer/blob/main/README.md

Specification

https://drafts.csswg.org/cssom-view/#scrolling-events

Summary

Scrollend events help developers reliably tell when a scroll has completed (including both the scroll itself and any updates to offsets from the scroll). Knowing when a scroll has completed is useful for various reasons, e.g. synchronizing some logic on the snapped section, fetching stuff in a list, triggering new animations, etc. This feature greatly simplifies the logic for handling end-of-scroll effects, ensuring that they are consistent across many different input modalities. Currently, developers address this need by observing scroll events and building ad-hoc timeout algorithms.



Blink component

Blink>Scroll

Search tags

scroll

TAG review



TAG review status

Not applicable

Risks



Interoperability and Compatibility

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

Not potentially high risk.



Debuggability

We verified via Protocol Monitor that DevTools supports breaking on scrollend listeners, similar to other events. DevTools UI change is needed to make this accessible which will be done via crrev.com/c/4376080.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name

N/A 

base::Feature is autogenerated from runtime_enabled_features.json5

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=907601

Estimated milestones

M114


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5186382643855360

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Apr 5, 2023, 12:11:26 AM4/5/23
to David Awogbemila, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
On Fri, Mar 31, 2023 at 3:50 PM David Awogbemila <awogb...@chromium.org> wrote:

The explainer says this shipped in 114. I guess it should say y'all are expecting to ship at that point :) 



Specification

https://drafts.csswg.org/cssom-view/#scrolling-events

Summary

Scrollend events help developers reliably tell when a scroll has completed (including both the scroll itself and any updates to offsets from the scroll). Knowing when a scroll has completed is useful for various reasons, e.g. synchronizing some logic on the snapped section, fetching stuff in a list, triggering new animations, etc. This feature greatly simplifies the logic for handling end-of-scroll effects, ensuring that they are consistent across many different input modalities. Currently, developers address this need by observing scroll events and building ad-hoc timeout algorithms.



Blink component

Blink>Scroll

Search tags

scroll

TAG review



TAG review status

Not applicable


Agree this is not needed, as this is following WG agreed-upon behavior, that has already shipped in one implementation.
 



Risks



Interoperability and Compatibility

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

Not potentially high risk.



Debuggability

We verified via Protocol Monitor that DevTools supports breaking on scrollend listeners, similar to other events. DevTools UI change is needed to make this accessible which will be done via crrev.com/c/4376080.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes


https://wpt.fyi/results/dom/events/scrolling?label=master&label=experimental&aligned paints an odd picture, where our current experimental implementation passes some of the tests, but not others, and Firefox seems to be failing some of them.
Can you elaborate on the end state you're expecting once this ships?
 



Flag name

N/A 

base::Feature is autogenerated from runtime_enabled_features.json5

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=907601

Estimated milestones

M114


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5186382643855360

This intent message was generated by Chrome Platform Status.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAA6pwF7nGNT0bwM8VY3Jj0TAEe9jNptKuwrMN1%3DO8tnqH2t8JQ%40mail.gmail.com.

Alex Russell

unread,
Apr 5, 2023, 11:24:35 AM4/5/23
to blink-dev, Yoav Weiss, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle, David Awogbemila
Also, was this send to the TAG?

On Tuesday, April 4, 2023 at 9:11:26 PM UTC-7 Yoav Weiss wrote:
On Fri, Mar 31, 2023 at 3:50 PM David Awogbemila <awogb...@chromium.org> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

David Awogbemila

unread,
Apr 5, 2023, 8:39:43 PM4/5/23
to Yoav Weiss, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
We expect the scrollend tests to pass on all the browsers except Safari which doesn't support scrollend yet I believe.
I've looked more closely into the failures and filed crbug.com/1430947 explaining the reasons they are failing should have them all fixed soon. They are mostly issues with the way the tests are written.

David Awogbemila

unread,
Apr 5, 2023, 8:40:28 PM4/5/23
to Alex Russell, blink-dev, Yoav Weiss, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
On Wed, Apr 5, 2023 at 11:24 AM Alex Russell <sligh...@chromium.org> wrote:
Also, was this send to the TAG?
No this wasn't sent to the TAG since scrollend is already included in the working group specification on scrolling (https://drafts.csswg.org/cssom-view/#scrolling-events) and it has already shipped in Firefox like Yoav mentions.


On Tuesday, April 4, 2023 at 9:11:26 PM UTC-7 Yoav Weiss wrote:
On Fri, Mar 31, 2023 at 3:50 PM David Awogbemila <awogb...@chromium.org> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Rick Byers

unread,
Apr 6, 2023, 9:59:06 AM4/6/23
to David Awogbemila, Alex Russell, blink-dev, Yoav Weiss, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
Thanks for the WPT failure investigation and work to get them passing. LGTM1 once they pass. I'm excited to see this ship!

Yoav Weiss

unread,
Apr 7, 2023, 4:49:44 AM4/7/23
to David Awogbemila, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
Do you have a sense of the Firefox failures? Are they all in newer tests that were added after they implemented the feature?
I'm slightly concerned we'd ship this with interoperability issues.

David Awogbemila

unread,
Apr 11, 2023, 4:47:01 PM4/11/23
to Yoav Weiss, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
I was able to reproduce the firefox failures locally and I observed 2 main issues:
i) In some tests Firefox just isn't scrolling or isn't firing scrollend when we expect it to, even though when I manually interacting with the firefox browser in the same scenarios it does scroll and does fire scrollend as expected. These seem to have to do with the test environment/setup. This affects old tests where it's not yet clear why the outcome is different in tests than via manual interaction.
There is an existing mozilla bug for some of these tests: https://bugzilla.mozilla.org/show_bug.cgi?id=1655754. I will update the relevant bugs to see if firefox folks can take a look. There are also newer bugs for more recent tests: https://bugzilla.mozilla.org/show_bug.cgi?id=1814530https://bugzilla.mozilla.org/show_bug.cgi?id=1826912. I will comment on these bugs as well.

ii) Firefox sometimes (i.e. when scrolling via keyboard) fires scrollend when there is no scroll - in this case, there shouldn't be a scrollend event, per the second note in the spec (https://drafts.csswg.org/cssom-view/#scrolling). With wheel scrolls, firefox (correctly) does not fire scrollend if there is no scroll. I will file a mozilla bug for this issue and update here when I've done so.

Yoav Weiss

unread,
Apr 12, 2023, 4:58:23 AM4/12/23
to David Awogbemila, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
Thanks for verifying this and for filing Firefox issues.

LGTM2

Daniel Bratell

unread,
Apr 12, 2023, 11:20:44 AM4/12/23
to Yoav Weiss, David Awogbemila, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle

Alex Russell

unread,
Apr 12, 2023, 11:33:57 AM4/12/23
to blink-dev, Daniel Bratell, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle, Yoav Weiss, David Awogbemila
Regardless of the LGTM's, it's not sufficient to cite a CSS WG draft. Please advise the TAG with an FYI before you ship.

On Wednesday, April 12, 2023 at 8:20:44 AM UTC-7 Daniel Bratell wrote:

LGTM3

/Daniel

On 2023-04-12 10:57, Yoav Weiss wrote:
Thanks for verifying this and for filing Firefox issues.

LGTM2

On Tue, Apr 11, 2023 at 10:46 PM David Awogbemila <awogb...@chromium.org> wrote:
On Fri, Apr 7, 2023 at 4:49 AM Yoav Weiss <yoav...@chromium.org> wrote:
On Thu, Apr 6, 2023 at 2:39 AM David Awogbemila <awogb...@chromium.org> wrote:
On Wed, Apr 5, 2023 at 12:11 AM Yoav Weiss <yoav...@chromium.org> wrote:
On Fri, Mar 31, 2023 at 3:50 PM David Awogbemila <awogb...@chromium.org> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Chris Harrelson

unread,
Apr 12, 2023, 12:08:32 PM4/12/23
to Alex Russell, blink-dev, Daniel Bratell, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle, Yoav Weiss, David Awogbemila
On Wed, Apr 12, 2023 at 8:34 AM Alex Russell <sligh...@chromium.org> wrote:
Regardless of the LGTM's, it's not sufficient to cite a CSS WG draft. Please advise the TAG with an FYI before you ship.

Hi Alex,

In this case I think a TAG review is not necessary for the reason that it's a WG-agreed spec already shipping at least one other browser.
 

On Wednesday, April 12, 2023 at 8:20:44 AM UTC-7 Daniel Bratell wrote:

LGTM3

/Daniel

On 2023-04-12 10:57, Yoav Weiss wrote:
Thanks for verifying this and for filing Firefox issues.

LGTM2

On Tue, Apr 11, 2023 at 10:46 PM David Awogbemila <awogb...@chromium.org> wrote:
On Fri, Apr 7, 2023 at 4:49 AM Yoav Weiss <yoav...@chromium.org> wrote:
On Thu, Apr 6, 2023 at 2:39 AM David Awogbemila <awogb...@chromium.org> wrote:
On Wed, Apr 5, 2023 at 12:11 AM Yoav Weiss <yoav...@chromium.org> wrote:
On Fri, Mar 31, 2023 at 3:50 PM David Awogbemila <awogb...@chromium.org> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/76a74d18-3704-4ca4-8e08-f45be9e95048n%40chromium.org.

David Awogbemila

unread,
Apr 17, 2023, 12:09:04 PM4/17/23
to Yoav Weiss, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
A quick update here:
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1827975 with mozilla about the keyboard issue and they seem to agree on the behavior being tested, i.e. "if no scrolling happened, don't fire scrollend", so I think they'll look into that bug on their end.
I've also commented on the other bugs where the test outcomes don't seem to reflect firefox's actual behavior when manually interacted with.

Best,
David

Rick Byers

unread,
Apr 19, 2023, 10:49:56 AM4/19/23
to David Awogbemila, Yoav Weiss, blin...@chromium.org, Robert Flack, Steve Kobes, Kevin Ellis, Mustaq Ahmed, Eugene Girard, Adam Argyle
Thanks for the update and coordination with Mozilla David!
   Rick

Reply all
Reply to author
Forward
0 new messages