Skip to content

add passive: false explicitly as default opt #1133

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

randomseed42
Copy link

add passive: false explicitly as default opt to remove below warning in echarts:

choose passive: false rather than passive: true is to avoid below error when doing dataZoom

  • Unable to preventDefault inside passive event listener invocation.

Although there are annotations on no neat way to using passive, I personally think it is higher priority to make this great package without warining and error, rather than not doing anything but endless wait to deal with this tiny potential performance issue. Just my two cents.

add `passive: false` explicitly as default opt to remove below warning in echarts:
- [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

choose `passive: false` rather than `passive: true` is to avoid below error when doing dataZoom
- `Unable to preventDefault inside passive event listener invocation.`

Although there are annotations on no neat way to using passive, I personally think it is higher priority to make this great package without warining and error, rather than not doing anything but endless wait to deal with this tiny potential performance issue. Just my two cents.
@randomseed42 randomseed42 marked this pull request as draft June 27, 2025 05:30
@randomseed42 randomseed42 marked this pull request as ready for review June 27, 2025 05:30
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.

1 participant