Closed Bug 1785918 Opened 3 years ago Closed 3 years ago

Programmatic smooth scrolls do not DispatchStateChangeNotification when they finish

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: dlrobertson, Unassigned)

References

(Blocks 1 open bug)

Details

Given the following in a mochitest, the DispatchStateChangeNotification will not be called when the smooth scroll finishes and the APZC will not change states from SMOOTHMSD_SCROLL to NOTHING:

scrollBy({ top: 2000, left: 0, behavior: "smooth" });

await promiseApzFlushedRepaints();
// The APZC will still be in the SMOOTHMSD_SCROLL state here

This may not cause issues currently, but will mean that when scrollend is supported no scrollend event will be posted when the programmatic scroll is completed.

To me, an await promiseApzFlushedRepaints() doesn't ensure its async smooth scroll end. Do you mean awaiting a promiseTransformEnd() promise?

(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)

To me, an await promiseApzFlushedRepaints() doesn't ensure its async smooth scroll end. Do you mean awaiting a promiseTransformEnd() promise?

Ah, you're right! For some reason I thought promiseApzFlushedRepaints would ensure the smooth scroll end.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.