You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Touch scrolling is designed to be fast when touchstart and touchmove listeners are passive, but it's fine for touchend to be non-passive (since it doesn't block scrolling). See here for some details including:
Although it's still necessary to do so for mobile Safari, websites should not rely on calling preventDefault() inside of touchstart and touchmove listeners as this is no longer guaranteed to be honored in Chrome. Developers should apply the touch-action CSS property on elements where scrolling and zooming should be disabled to notify the browser before any touch events occur. To suppress the default behavior of a tap (such as the generation of a click event), call preventDefault() inside of a touchend listener.
From code inspection it looks to me like Polymer's passiveTouchGestures feature (#3604) sets all touch listeners to passive, including touchend. This will make adoption harder because it disables the ability to suppress click events. See for example b/66423965 inside Google.
Perhaps passiveTouchGestures can simply be updated to apply only to touchstart and touchmove listeners?
`touchend` listeners do not need to be passive to enable more performant
scrolling.
With this change, most of the tradeoffs with enabling
`passiveTouchGestures` disappear, leaving only the inability to control
scrolling from `track`, `down`, and `move` gestures.
Fixes#4961
Touch scrolling is designed to be fast when
touchstart
andtouchmove
listeners are passive, but it's fine fortouchend
to be non-passive (since it doesn't block scrolling). See here for some details including:From code inspection it looks to me like Polymer's
passiveTouchGestures
feature (#3604) sets all touch listeners to passive, includingtouchend
. This will make adoption harder because it disables the ability to suppressclick
events. See for example b/66423965 inside Google.Perhaps
passiveTouchGestures
can simply be updated to apply only totouchstart
andtouchmove
listeners?/cc @azakus @dtapuska
The text was updated successfully, but these errors were encountered: