【问题标题】:Does Internet Explorer 11 support Multi-Touch?Internet Explorer 11 是否支持多点触控?
【发布时间】:2014-06-17 20:22:25
【问题描述】:

我正在开发一个在 Chrome 和 Firefox 中运行良好的多点触控绘图应用程序,但我无法从微软那里得到任何关于是否多点触控的直接答案(即:事件.touches) 在 Internet Explorer 11 中受支持。

目前可以在其他浏览器中使用的代码片段如下:

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

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

在 chrome 中,它会打印出触摸次数,但在 Internet Explorer 中我什么也得不到。如果有人知道这是否是 IE 的问题,我将不胜感激。

谢谢。

【问题讨论】:

  • 与 chrome 和 ff 相比,它们具有不同且更好的多点触控方式

标签: javascript html multi-touch internet-explorer-11


【解决方案1】:

IE 有不同的方法:W3C 指针事件 http://msdn.microsoft.com/en-us/library/ie/dn433244.aspx

p.s.:如果您只是想测试多点触控支持,请使用navigator.msMaxTouchPoints

if (navigator.msMaxTouchPoints > 1) { ... }

【讨论】:

  • 这是我问题的解决方案,谢谢,但我无法让它与 Windows 7 一起使用。当我查看 Microsoft 的一个演示时,它告诉我 Windows 8.1 IE11 应用程序是需要完整的功能。我还注意到,在 Windows 7 的 IE11 中,navigator.maxTouchPoints 调用不会返回任何内容,但在 Chrome 中会返回 10。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多