W3C home > Mailing lists > Public > public-webevents@w3.org > April to June 2013

RE: Send touchcancel when scrolling starts?

From: Wes Johnston <wjohnston@mozilla.com>
Date: Thu, 20 Jun 2013 23:23:43 -0700
Message-ID: <COL126-W444946418BE01F8D7AC422F58F0@phx.gbl>
To: Tim Abraldes <tabraldes@mozilla.com>, Rick Byers <rbyers@google.com>
CC: "olli@pettay.fi" <olli@pettay.fi>, Paul Kinlan <paulkinlan@google.com>, "public-webevents@w3.org" <public-webevents@w3.org>, Alexandre Elias <aelias@chromium.org>, Jim Mathies <jmathies@mozilla.com>, Matt Brubeck <mbrubeck@mozilla.com>
> In contrast, Firefox, Chrome deskop, and mobile safari on divs with
> -webkit-overflow-scrolling:auto all behave in the simpler but slower
> fashion. Each scroll frame is blocked on the touchmove event, and
> calling preventDefault on any touchMove can temporarily stop the
> scroll. This is certainly best for compatibility and gives the site
> the most control, but it's terrible for scrolling performance (which
> we know is critical to engagement). Sites seem to often have
> unnecessary touch handlers (eg. due to a desire to use event
> delegation) and people don't realize how it contributes to scroll
> jank.FWIW,
this is NOT true of Firefox for Android or B2G (and shouldn't be for 
touch enabled Metro Firefox once they have OMTC turned on). i.e. We do NOT block scrolling while waiting for content to process EVERY touchmove event. We do block for a short time during the start of a scroll (200ms I think), or until we've heard back from content that preventDefault wasn't called on touchstart of the FIRST touchmove, whichever comes first. In fact, the spec is fairly specific about this: "If the preventDefault method is called on the FIRST
          touchmove event of an active touch point, it should
          prevent any default action caused by any touchmove event
          associated with the same active touch point, such as scrolling." 

We also do not (currently) on Firefox for Android send touchcancel when we start scrolling. In fact, we continue to send touchmove events. I have no idea if there's a strong usecase for allowing scrolling while still sending touch events. Perhaps on pages that want to do some sort of horizontal transform while also scrolling vertically? There isn't much jank associated with it because, as I mentioned, we have OMTC on all the platforms where we support touch. I don't have strong feelings about sending a touchcancel and killing all events after that if people want to though.

- Wes

 		 	   		  
Received on Friday, 21 June 2013 06:24:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:09:35 UTC