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

Quick fix for a Chrome Warning about wheel event that should be declared passive #30

Open
micbuffa opened this issue Oct 9, 2018 · 3 comments

Comments

@micbuffa
Copy link
Contributor

micbuffa commented Oct 9, 2018

Hi! Just change line 111 of webaudiocontrols.js by this will remove an ennoying warning in Chrome about "you should declare wheel event as passive":

  this.addEventListener("wheel",this.wheel**, {passive: true}**);

Thanks in advance !

Michel

@g200kg
Copy link
Owner

g200kg commented Oct 18, 2018

I can not reproduce the warning because I do not know what the warning will be issued, but ...

In my understanding {passive: true} means that preventDefault() has not been called in handler, so in this case {passive: false} is correct? Will the warning disappear even though {passive: false}?

https://developers.google.com/web/tools/lighthouse/audits/passive-event-listeners?hl=en

@micbuffa
Copy link
Contributor Author

This warning disappeared in my chrome. Or maybe I added the fix I suggested. I'll check and keep you informed...

@g200kg
Copy link
Owner

g200kg commented Oct 18, 2018

I added {passive: false} to try.
I will investigate again if problems remain.

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

2 participants