我正在使用 iscroll.js (v4.1.9),但如果我在 chrome 浏览器中启用了 chrome://flags/下的触摸事件(启用触摸事件)。用户无法滚动使用 iScroll 的面板。
任何人都可以提出同样的解决方案吗?提前致谢。
最佳答案
我遇到了 Chrome 和水平滚动触摸事件的问题。我找到了问题的解决方案here .
TLDR:必须禁用 iscroll 中的指针事件并启用触摸事件
this.iscroll = new IScroll(this.iscrollEl, {
scrollX: true,
scrollY: false,
mouseWheel: false,
disablePointer: true,
disableTouch: false,
disableMouse: false
});
关于javascript - 如果启用触摸事件,iScroll 将不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39607777/