jquery/standards — Issue #8: Divergent Microsoft-W3C touch event models
Author: dmethvin
Created: 2011-10-25 00:32:56+00:00
State: open

The W3C draft touch event standard already has pretty widespread adoption and implementation. If nothing else, it uses interfaces and naming conventions that are consistent with the rest of the W3C event model.

http://www.w3.org/TR/touch-events/

Microsoft has defined a different model for its Windows 8/IE10 touch events that live in a vendor-specific namespace (MSPointerDown, MSPointerMove, etc.). As of now, IE10 has no implementation of the W3C touch events. Here's some info on the MS touch events:

http://blogs.msdn.com/b/ie/archive/2011/10/19/handling-multi-touch-and-mouse-input-in-all-browsers.aspx

As you can see, there is quite a bit of code required to handle both models, and the example is not a complete or generalized compatibility layer. Microsoft also requires a special "-ms-content-zooming: none" CSS property to be added to an element before it can use touch. jQuery and other libraries could try to map the Microsoft model into the W3C one but at first glance it seems like this would be difficult and inefficient. For example, Microsoft fires a separate MSPointerMove event for each touch point, but the W3C touchmove fires once and provides an array of active touch points.

Web developers would be best served if everyone could get along and use the same event model for touch events.