Re: [csswg-drafts] [css-overscroll-scrollend-events] Content has no way of understanding whether it is being overscrolled or whether scroll has ended (#3801)

I'm wondering how the overscroll event works with inertial scroll, specifically the calculation of the deltaX/Y values.  When the overscroll is caused by the user keeping their finger(s) down and 'pulling' on the screen or touchpad, there is a definitive delta that the user attempted to move which can be reported.  With a UA's default affordance for overscroll, this delta may be modified using some sort of simulated tension so that the actual overscroll delta is a subset of the user delta.  But, the deltaX/Y appears to report the actual user delta (without any tension) if I'm reading the CSSOM View spec proposed changes correctly.  When inertia is involved, there is no user movement value to report as far as I know.  What would one report for deltaX/Y in this case?  Should the UA compute a user delta that would have been moved to generate the actual overscroll delta used from the inertia animation?  That seems to make sense - but depending on the UA 'tension' algorithm used, it might not be trivial.

Also, if the user overscrolls while keeping the finger down, and then flings out of the overscroll in the opposite direction, I believe we can get this sequence of events:

scroll
scroll
overscroll (based on actual user movement)
overscroll (based on computed user deltas due to inertia?)
scroll
scroll
scrollend

Or if the fling travels all the way to the other scroll extent, one could even see:

scroll
scroll
overscroll (based on actual user movement)
overscroll (based on computed user deltas due to inertia?)
scroll
scroll
overscroll (based on computed user deltas due to inertia?)
overscroll (based on computed user deltas from tension returning to the normal scroll boundary)
scrollend

Do these align with your expectations?

-- 
GitHub Notification of comment by SamFort-MSFT
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3801#issuecomment-574365443 using your GitHub account

Received on Tuesday, 14 January 2020 20:44:54 UTC