yanhaijing / zepto.fullpage

Focusing on the fullPage.js for mobile terminals.
MIT License
2.1k stars 510 forks source link

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive #115

Open ixqbar opened 4 years ago

ixqbar commented 4 years ago

问题是什么

demo/basic.html

环境

在线例子

如果有请提供在线例子

其他

其他信息

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See

yanhaijing commented 4 years ago

有什么好的解决办法吗?

34892002 commented 3 years ago

@yanhaijing 修改146行 line 146 holdTouch: function() { // $(document).on('touchmove', touchmove); window.document.addEventListener('touchmove', touchmove, { passive: false }) } unholdTouch: function() { // $(document).off('touchmove', touchmove); window.document.removeEventListener('touchmove', touchmove) }

yanhaijing commented 3 years ago

@liohao 欢迎提个pr,感觉还得判断下是否支持第三个参数是对象吧