Will/Does IE10 Support Touch Events?

后端 未结 2 715
孤城傲影
孤城傲影 2020-12-29 12:55

I\'m looking at doing a project that would target Internet Explorer 10 using a touch screen. I don\'t currently have a touch screen handy, but need to know if Internet Expl

相关标签:
2条回答
  • 2020-12-29 13:14

    Update: Touch Events are in development in Internet Explorer.

    While IE10 will not support the touchstart and touchend type of events, it will support an arguably superior model consisting of Pointers. These generic pointers capture input from pens, mice, and fingers. A great primer was given in the post Touch Input for IE10 and Metro style Apps, dated Sept, 2011.

    You should be able to get the older touch model to work well with the MSPointer model with just abit of feature-detection and clever-scripting:

    var elm = document.getElementById("#foo"),
        evt = window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart";
    
    elm.addEventListener(evt, handler, false);
    

    More on Pointer and Gesture events can be found here: http://msdn.microsoft.com/en-US/library/ie/hh673557.aspx

    Important Developments

    • The W3C has formed a Working Group based on Microsoft's Pointer model.
    • Hand.js: a polyfill for supporting pointer events on every browser
    0 讨论(0)
  • 2020-12-29 13:25

    It appears IE 10 doesn't support the 'touchstart' family of events used by iOS and other mobile browsers. IE 10 does however support multi-touch events using their own 'MSPointer' events. See http://msdn.microsoft.com/en-us/ie/hh272903#_DOMTouch for details and example sites like http://ie.microsoft.com/testdrive/Graphics/TouchEffects.

    0 讨论(0)
提交回复
热议问题