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
{{ message }}
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Today it looks like PointerEvents only ever calls preventDefault on touchmove events.
There are scenarios where developers call preventDefault on touchstart today. The most compelling scenario is perhaps as a way to disable the long press affordance we have in chrome desktop before dispatching a contextmenu event. If Chrome were to implement pointer events natively, we'd probably make cancelling a pointerdown do that (although a CSS-based mechanism may be better).
Should PointerEvent have some way of cancelling the underlying touch event? Maybe even a 'cancelOriginalEvent()' method or something - would be a bit of a hack, but probably better than the alternative of the developer having to add a touch event listener.
There's an equivalent mouse scenarios as well that I haven't looked into as deeply. Eg. calling preventDefault on mouseDown disables text selection, and so should calling it on pointerdown. Does that already work?
The text was updated successfully, but these errors were encountered:
Today it looks like PointerEvents only ever calls preventDefault on touchmove events.
There are scenarios where developers call preventDefault on touchstart today. The most compelling scenario is perhaps as a way to disable the long press affordance we have in chrome desktop before dispatching a contextmenu event. If Chrome were to implement pointer events natively, we'd probably make cancelling a pointerdown do that (although a CSS-based mechanism may be better).
Should PointerEvent have some way of cancelling the underlying touch event? Maybe even a 'cancelOriginalEvent()' method or something - would be a bit of a hack, but probably better than the alternative of the developer having to add a touch event listener.
There's an equivalent mouse scenarios as well that I haven't looked into as deeply. Eg. calling preventDefault on mouseDown disables text selection, and so should calling it on pointerdown. Does that already work?
The text was updated successfully, but these errors were encountered: