Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ixqbar opened this issue Jan 7, 2020 · 3 comments
Assignees

Comments

@ixqbar
Copy link

ixqbar commented Jan 7, 2020

问题是什么

demo/basic.html

环境

  • 手机:
  • 系统:pc
  • 浏览器:chrome 61
  • zepto版本:1.1
  • zepto.fullpage版本:v0.5.0

在线例子

如果有请提供在线例子

其他

其他信息

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

@yanhaijing
Copy link
Owner

有什么好的解决办法吗?

@34892002
Copy link

34892002 commented Dec 22, 2020

@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
Copy link
Owner

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

@yanhaijing yanhaijing self-assigned this Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants