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

Console error when using mousewheel: "Unable to preventDefault inside passive event listener invocation" #3932

Closed
blinky1994 opened this issue Sep 25, 2023 · 5 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@blinky1994
Copy link

Describe the bug

When using the mousewheel to zoom, the console logs an error: Unable to preventDefault inside passive event listener invocation. It seems to be coming from node_modules@antv\x6\src\util\dom\mousewheel.ts, where event.preventDefault is being called.

This is because of the default passive event listeners. Reference: https://developer.chrome.com/blog/scrolling-intervention-2/

Your Example Website or App

NA

Steps to Reproduce the Bug or Issue

  1. Enable zooming feature and use mousewheel to scroll.

  2. The console will log an error when scrolling.

Expected behavior

As a user, I am expecting to prevent double scrolling by stopping the default scrolling behaviour of the page when I am using the zooming on the graph.

Screenshots or Videos

No response

Platform

  • OS: Windows 10 pro 64-bit
  • Browser: Chrome, Edge
  • Version:
    Chrome (Version 116.0.5845.188 (Official Build) (64-bit)),
    Edge (Version 117.0.2045.36 (Official build) (64-bit))

Additional context

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 25, 2023

👋 @blinky1994

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

NewByVector commented Sep 25, 2023

x6 2.x fixes the issue, please upgrade to 2.x version. 1.x now only accepts communal pr.

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Sep 25, 2023
@blinky1994
Copy link
Author

Thank you, it's resolved :)

@History-1024
Copy link

这个问题现在还是有警告的 怎么做能没有警告
image

@nanfb
Copy link

nanfb commented May 30, 2024

x6 2.x 修复了该问题,请升级到 2.x 版本。1.x 现在仅接受公共 pr。

这个问题在2.x也有,我不确定是不是我代码写的有问题,鼠标拖动时mouseup还是会有提示吗,但是其他的行为没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

4 participants