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

fix: 明确设置touchstart/touchmove事件的passive配置项 #2

Merged
merged 1 commit into from
May 25, 2023

Conversation

champkeh
Copy link
Contributor

现有的touchstarttouchmove事件在绑定时第三个参数为false,根据 https://chromestatus.com/feature/5093566007214080 处的说明,某些高版本浏览器passive选项默认为true,也就会导致事件处理器内部在调用e.preventDefault()时报如下错误:

image

因此需要将这两类事件明确配置为passive:false

Copy link
Collaborator

@wqcstrong wqcstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢!

@wqcstrong wqcstrong merged commit 2e26cd1 into HuolalaTech:main May 25, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants