Closed RByers closed 2 years ago
@patrickhlauke @staktrace @patrickkettner WDYT? As I understand it this is close to what Gecko and Edge do, except that you may not fire the touch events at ALL during the scroll, right? Safari fires uncancelable ones during a scroll, and an uncancelable touchstart
on fling but still a cancelable touchmove
.
See some more discussion here
Yeah, in Gecko we don't fire the touch events at all. But putting this in the spec seems like a good clarification.
I think the "may not" wording could be improved though - usually "may not" means that it shouldn't happen (e.g. "you may not go the washroom") but in this case what you're trying to say is that the browser might "not suspend the motion of an element". I suggest rewording to either: ... User Agents may continue the motion ... ... User Agents might not suspend the motion ... (or something else).
Agree with @staktrace that "may not" has a different connotation to what we're trying to say (even at the start of the sentence, which is not modified by this PR). it's difficult to come up with an unambiguous and short way to say "the UA may choose not to do X", so for clarity I'd suggest turning those statements around into the opposite, to say what the UA may actively do (rather than what the UA may choose not to do), if that makes sense...
Possibly something like
However, for maximum scroll performance, a user agent may decide to process touch events associated with the scroll, without waiting to see if it will be canceled. In particular, user agents may continue the motion of an element which is currently moving due to a touch scroll, either as a result of an earlier event in the touch sequence, or due to momentum left over from a previous touch sequence, rather than suspending the motion.
Wondering if the second sentence can be condensed a bit - unless I'm misunderstanding the overall meaning, I'm not quite clear why we're now talking about motion of elements, when (i think) what we want to say in short is:
In particular, regardless of any canceled touch events, a user agents may continue an ongoing scroll motion – caused by an earlier event in the touch sequence, or by momentum left over from a previous touch sequence (e.g. a "fling" gesture) – rather than halting the scrolling.
@RByers is this still relevant/needed?
@RByers ping?
Oh, sorry that I apparently just dropped this. It's still relevant in that AFAIK it describes behaviour in multiple browsers. But it's not necessarily "needed", just a small clarification. If you think it ads value to describe this case explicitly then I'm fine landing the text your proposed. Otherwise I'm fine just leaving it all as is.
@RByers @staktrace coming back very late, but: could you cast your eye one last time over this PR which now uses the rewording I proposed above? If all good, I'll merge.
Thanks @patrickhlauke! LGTM
Fixes #76