4

I am working on a multi-touch drawing application which works great in Chrome and Firefox, but I can't get anything from Microsoft as far as a straight forward answer goes as to whether or not multi-touch (ie: event.touches) is supported in Internet Explorer 11.

Right now a code snip that works in other browsers is as follows:

window.addEventListener("touchstart", onTouchStart, true);

function onTouchStart(event) {
  console.log(event.touches.length);
}

In chrome it will print out the number of touches, but I get nothing in Internet Explorer. If anyone knows if this is a problem with IE I would be appreciative.

Thanks.

1 Answers1

2

IE has different way to do it: W3C Pointer Events http://msdn.microsoft.com/en-us/library/ie/dn433244.aspx

p.s.: if you simply want to test for multi-touch support, use navigator.msMaxTouchPoints.

if (navigator.msMaxTouchPoints > 1) { ... }
c69
  • 19,951
  • 7
  • 52
  • 82
  • This is the solution to my question, so thank you, but I can't get it to work with Windows 7. When I looked at one of Microsoft's demos it told me that Windows 8.1 IE11 app was required for full functionality. I also noticed that in IE11 in Windows 7 the navigator.maxTouchPoints call doesn't return anything, but it returns 10 in Chrome. – jake_higgins Jun 17 '14 at 16:53