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

warning in chrome : [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event #26

Open
MathieuDerelle opened this issue Jan 28, 2022 · 3 comments

Comments

@MathieuDerelle
Copy link

I've just tried your lib (version 6.10.1) and this warning in showing up in console

It's present on your demo page too
https://worka.github.io/vanilla-js-wheel-zoom/demo-image.html

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

worka commented Jan 31, 2022

Hm. If I do passive event listener, then page will be scrolling on mouse wheel event.

@mkitty101
Copy link

I am having this same issue, I've tried every code sample I can find and now I've made it worse. I'm needing serious help with this issue, I've had the issue for awhile but at first it was just saying I needed to add the listener as passive but when I did now its saying the same thing, [Violation] Added non-passive event listener to scroll-blocking 'wheel' event.

@mkitty101
Copy link

No, It actually says 'touchstart' event

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

No branches or pull requests

3 participants