apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

[Bug] [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. #18255

Open Skrypt opened 1 year ago

Skrypt commented 1 year ago

Version

5.4.1

Link to Minimal Reproduction

No response

Steps to Reproduce

import * as echarts from "echarts";

echarts.init(container);

Current Behavior

[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

image

Expected Behavior

This violation warning should not display.

Environment

- OS: Windows 11
- Browser: 110.0.5481.77
- Framework: Vue 3

Any additional comments?

No response

doyao commented 1 year ago

I found the method of installing default-passive-events on the internet and the warning disappeared. But when I use the scrolling chart of echarts, I will report an error: Unable to preventDefault inside passive event listener invocation

LvChengbin commented 1 year ago

Will this bug be fixed soon?

clark-tan commented 1 year ago

Hope to fix it in the next release

ericrange commented 1 year ago

+1

Thevyn commented 1 year ago

+1

kanxingyv commented 1 year ago

We need to fix this problem, please.

plainheart commented 1 year ago

Some components like DataZoom will need to stop the scroll behavior, so it can't be simply set as passive.

cj123195 commented 1 year ago

+1, v5.4.2

chainix commented 1 year ago

+1, v5.4.3

rr13k commented 1 year ago

+1 需要修复这个问题

yimingbot commented 1 year ago

+1 echarts@v5.4.3 zrender@5.4.4 调用echarts.init初始化时 就会出现这个告警

image

zyt520ham commented 10 months ago

请在 init 方法调用mousewheel监听的事件中添加 { passive: true } 选项参数,屏蔽一下这个警告,谢谢

History-1024 commented 9 months ago

添加了 { passive: true } 选项参数 ,没生效 还是报这个警告,你们的解决了吗

AKclown commented 9 months ago

添加了 { passive: true } 选项参数 ,没生效 还是报这个警告,你们的解决了吗

官方都没有这个 参数,肯定没生效呢。 目前看没有解决,我也遇到同样的警告在init时

Dev-Hogan commented 9 months ago

I have the same issue

shifatul-i commented 9 months ago

+1

NazarovAsadbek-AX commented 8 months ago

+1

xiaoyan13 commented 6 months ago

建议新版本在相关的处理事件的监听中,显式的声明出 passive 的状态,以屏蔽此警告

YI-- commented 5 months ago

Any new developments?

1109955705 commented 4 months ago

v5.5.0 also get warnning

CollectorOfGarbage commented 3 months ago

Is there any progress on this?

hukun1993 commented 2 months ago

+1 需要修复这个问题

jy03187487 commented 1 month ago

I also got this waning. Is there a plan to fix this?

funnel20 commented 6 days ago

Also applicable on macOS 14.6.1 with Chrome 127.0.6533.120 and ECharts 5.5.1