This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25215 - Tweak to example 1 and what element touch-action is applied to
Summary: Tweak to example 1 and what element touch-action is applied to
Status: RESOLVED FIXED
Alias: None
Product: PointerEventsWG
Classification: Unclassified
Component: Pointer Events specification (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jacob Rossi [MSFT]
QA Contact: Pointer Events Bugzilla list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 09:47 UTC by Patrick H. Lauke
Modified: 2014-06-02 23:03 UTC (History)
1 user (show)

See Also:


Attachments

Description Patrick H. Lauke 2014-03-31 09:47:54 UTC
Currently, example 1 starts with

<style>
  /* Disable intrinsic user agent touch behaviors (such as panning or zooming) so 
  that all events are given to the application instead. */
  
  html { 
    touch-action: none; 
  }
</style>

Personally, I find this a little heavy-handed and "dangerous". I've usually advocated applying touch-action (and before that, in touch events, preventDefault) more "surgically" just to the elements where it's needed, to avoid developers cargo-culting overly broad snippets of css/js that kill all browser defaults for everything.

I'd suggest applying it just to the canvas element in this example.

...
canvas {
  touch-action: none;
}
...
Comment 1 Jacob Rossi [MSFT] 2014-06-02 23:03:50 UTC
Really good bug to fix as IE and Chrome have been seeing compat issues with sites that apply touch-action to heavy handed.

Fixed as suggested: https://dvcs.w3.org/hg/pointerevents/rev/c8ab8227ddcc