inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

Chrome: Added non-passive event listener to a scroll-blocking 'wheel' event. #775

Open GabbasovDinar opened 5 years ago

GabbasovDinar commented 5 years ago

When I use the plugin, I have warning message on the chrome console:

[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

Is passive event support available? If not, will there be support?

nicolasambroise commented 5 years ago

In Google Lighthouse Audit we get : Does not use passive listeners to improve scrolling performance Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance. Passive Event Listeners

Should I put true on "jquery.nicescroll.js" line 2420 ? var passiveSupported = false;

caijwei commented 5 years ago

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See

In my project, Google Chrome will also have such an error, I think this is a problem, and I tried to use the latest version, and did not solve the problem, the latest version has been added var passiveSupported = false;

kidzen commented 3 years ago

npm i tolc/jquery.nicescroll#master

install it from specific repository temporarily did the trick