且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

禁用在Android浏览器中触发touchcancel

更新时间:2021-08-11 21:13:15

如果您正在使用hammer.js,您可以禁用指针事件(这会导致像这个),通过添加:
删除window.PointerEvent;
在index.html中加载hammer.js之前,它将忽略这些事件。

你也可以设置SUPPORT_POINTER_EVENTS = false; (v2.0.8的第384行)做同样的事情。
理想情况下,开发人员会增加关闭它的能力,但开源难度也是如此......

If you are useing hammer.js, you can disable pointer-events (which cause problems like this), by adding: delete window.PointerEvent; in your index.html PRIOR to loading hammer.js, and it will ignore those events.
You can also set SUPPORT_POINTER_EVENTS = false; (line 384 of v2.0.8) to do the same thing. Ideally the devs would add the ability to turn this off, but so goes the open source dilemma...