【发布时间】:2016-11-03 19:49:06
【问题描述】:
我找到了这个小提琴来测试我的浏览器中的触摸支持。 http://jsfiddle.net/J3TV8/97/
$(document).on("touchstart touchmove touchend touchcancel", function(ev) {
$.each(ev.originalEvent.touches, function (i, t) { logtouch(ev.type + "-touches", t); });
$.each(ev.originalEvent.changedTouches, function (i, t) { logtouch(ev.type + "-changed", t); });
$.each(ev.originalEvent.targetTouches, function (i, t) { logtouch(ev.type + "-target", t); });
});
我已删除上述链接中的 mousemove、mouseclick、mousedown 和 mouseup 事件,因此我可以测试触摸事件而不受其他事件的任何干扰
上面的小提琴在 chrome 中显示了一些文本,但在 Mozilla firefox 和 IE11 中没有任何效果。
触控支持的 MDN 链接:https://developer.mozilla.org/en-US/docs/Web/API/Touch_events
我也试过上面的 MDN 链接,但在小提琴中没有触发触摸事件的痕迹
当我检查 caniuse.com http://caniuse.com/#feat=touch 时,支持表显示红色的 firefox 并带有一个标志。但是MDN链接没有提到任何。
有什么方法可以识别 Firefox 和 ie11 中的多点触控吗?。因为我正在为我的小部件添加捏合支持。我不确定如何在这些浏览器中识别多点触控。
编辑: 火狐版本是47.0.1
【问题讨论】:
标签: javascript firefox touch internet-explorer-11 multi-touch