PSA: Chrome will start ignoring touch-action changes at pointerdown, again!

Skip to first unread message

Mustaq Ahmed

Aug 5, 2022, 12:28:41 PM8/5/22
to blink-dev, Robert Flack

Summary: Chrome will soon ignore any changes to touch-action done at a pointerdown event handler until the end of current touch-gesture, fully matching the spec and other major browsers again.


The PointerEvents spec requires the browser to ignore any changes to touch-action CSS property after the pointerdown event has been dispatched.  This makes the browser's scrolling decision independent of main thread responsiveness during gesture handling.

While Chrome originally shipped PointerEvents with the correct behavior as explained above, a follow-up refactoring accidentally moved touch-action evaluation to after pointerdown event dispatch.  We noticed the bug a few months ago but our attempt to fix it caused a regression.  This is when we realized that for at least 4 years the bug has actually been exposed to developers. This made touch-action changes at pointerdown able to allow/prevent scrolling similar to the cancelability of touchstart event, though unreliably if the event wasn’t handled quickly enough.

For compat’s sake, we decided to hold back the fix until we have data on potential impact on the Web.  The good news is that recent M105 Canary/Dev data show that the impact is negligible: at most 0.0036%, 0.0024% and 0.0001% of page loads respectively on Android, CrOS and Windows change touch-action at touch pointerdown.  The fraction of page loads impacted by the fix is lower than these numbers because not all these pointerdown events correspond to scrolling gestures (e.g. these events include taps).

We will soon re-land the fix and fully match the spec.  This will also improve our interop story: both Safari on iOS and Firefox are spec compliant in this respect.

Reply all
Reply to author
0 new messages