Closed
Bug 1172171
Opened 9 years ago
Closed 7 years ago
Add a chrome-only scrollend event
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla58
People
(Reporter: sfoster, Assigned: mconley)
References
Details
Attachments
(2 files)
When smooth-scrolling there is currently no good way to determine that scrolling has ended. We can wait some number of milliseconds or frames and watch that scrollLeft/Top doesnt change and no further scroll events have been fired. It would be extremely useful to have an event analogous to transitionend and animationend that allowed an author to be notified when scrolling has stopped.
Comment 1•9 years ago
|
||
FWIW I think this is a good idea, particular with APZ scrolling where the scrolling is even more async than "main-thread async" scrolling.
Comment 2•9 years ago
|
||
(In reply to Sam Foster [:sfoster] from comment #0) > When smooth-scrolling there is currently no good way to determine that > scrolling has ended. We can wait some number of milliseconds or frames and > watch that scrollLeft/Top doesnt change and no further scroll events have > been fired. It would be extremely useful to have an event analogous to > transitionend and animationend that allowed an author to be notified when > scrolling has stopped. +1 There's really no good way to do this on the content side currently. Or least none that we know of :)
Comment 3•9 years ago
|
||
n?jet just to make sure that layout/rendering are aware of this request :) This would be extremely useful, especially now we have CSS scroll snapping.
Flags: needinfo?(bugs)
Updated•9 years ago
|
Assignee: nobody → mstange
Flags: needinfo?(bugs)
Comment 4•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/30553/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/30553/
Comment 5•8 years ago
|
||
It's working pretty well for our use case! (An APZ based UI, where we frequently call |.scrollTo({behavior: 'smooth'}))| and want to trigger something right after the scroll [1]). One thing that I noted is that I always get a second scrollend event ~680ms after the first one. Wonder if it comes from our use of CSS-snapping... [1] https://github.com/kite-project/hope/pull/28
Comment 7•8 years ago
|
||
I have a few high priority regressions to fix, so at the moment I don't have time to investigate why we're getting a second scrollend event in some cases. Would you like me to land this, even in the preffed-off by default state, and even though we sometimes fire an extra event?
Flags: needinfo?(mstange)
Comment 8•8 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #7) > I have a few high priority regressions to fix, so at the moment I don't have > time to investigate why we're getting a second scrollend event in some cases. > Would you like me to land this, even in the preffed-off by default state, > and even though we sometimes fire an extra event? Yes :) We're not exactly in a rush, but we can definitely move forward on the frontend side while leaving the "double event" issue to a follow up.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Summary: Proposal: scrollend event → Add a chrome-only scrollend event
Assignee | ||
Updated•7 years ago
|
Assignee: mstange → mconley
Status: NEW → ASSIGNED
Reporter | ||
Comment 10•7 years ago
|
||
The original request in Comment #0 came out of firefox OS and the need for a scrollend event in content (rather than or as well as in chrome). But if it takes a chrome-only implementation to move this forward and prove (or not) its value, I'm happy :)
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8927463 [details] Bug 1172171 - Add a chrome-only scrollend event. https://reviewboard.mozilla.org/r/198786/#review203874
Attachment #8927463 -
Flags: review?(bugmail) → review+
Comment 12•7 years ago
|
||
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dbdc2cf84084 Add a chrome-only scrollend event. r=kats
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dbdc2cf84084
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•