touch-action doesn't take immediate effect when set in pointerdown |
||||
Issue descriptionChrome Version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3086.0 Safari/537.36 OS: ChromeOS 9334.42.0, Android 7.1.2 What steps will reproduce the problem? (1) Set target.style.touchAction='none' in a pointerdown handler (2) drag on the target with a finger What is the expected result? pointermove is sent for every movement, because touchAction was set before the first pointermove. What happens instead? touchAction doesn't seem to take effect until after you lift and replace your finger on the drag target. I've prepared this reduction: https://codepen.io/appsforartists/full/dWRQKr The issue is easily reproducible in Mac DevTools with touch emulation on, ChromeOS, and Android. Edge on Windows works correctly in the same demo.
,
May 3 2017
,
May 3 2017
Blocks http://codereview.cc/D3151
,
May 3 2017
,
May 3 2017
This is expected. Please see the spec... https://w3c.github.io/pointerevents/#determining-supported-touch-behavior specifically this text "For instance, programmatically changing the touch-action value for an element from auto to none as part of a pointerdown handler script will not result in the user agent aborting or suppressing any default touch behavior for that touch for as long as that pointer is active." pointerdown is an event that is sent right away and it doesn't block scrolling so if scrolling ends up starting it has already figured out the touch-action. |
||||
►
Sign in to add a comment |
||||
Comment 1 by brentons@google.com
, May 3 2017