-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Uses Passive Event Listeners to Improve Scrolling Performance #350
Comments
I have found also that this leads to console errors as such:
Scrolling performance, using this plugin on desktop devices, is laggy and leaves the UI feeling at times unresponsive and glitchy as the scroll fights the wheel steps down the page. Commenting out the following function improves scrolling performance and dramatically smooths out the scrolling:- function wheel(event) {
if (!initDone) {
init();
}
// This is the problematic section of code
// var target = event.target;
// var overflowing = overflowingAncestor(target);
// if (!overflowing || event.defaultPrevented || isNodeName(activeElement, "embed") || (isNodeName(target, "embed") && /\.pdf/i.test(target.src))) {
// return true;
// }
// var deltaX = event.wheelDeltaX || 0;
// var deltaY = event.wheelDeltaY || 0;
// if (!deltaX && !deltaY) {
// deltaY = event.wheelDelta || 0;
// }
// if (!options.touchpadSupport && isTouchpad(deltaY)) {
// return true;
// }
// if (Math.abs(deltaX) > 1.2) {
// deltaX *= options.stepSize / 120;
// }
// if (Math.abs(deltaY) > 1.2) {
// deltaY *= options.stepSize / 120;
// }
// scrollArray(overflowing, -deltaX, -deltaY);
//event.preventDefault();
} I am unsure at this stage what effect this will have on mobile devices scrolling abilities. I may opt to implement a device type test before allowing this particular section of code to run, therefore reclaiming scroll performance on Desktop whilst preserving functionality on touch devices. |
I've noticed this is still an issue. Will this be fixed in a future version? Thanks! |
Yeah, I'm going to carve out some time next week to do an overhaul and
clean up alot of issues like this.
…On Wed, 24 Mar 2021, 22:37 rsmith4321, ***@***.***> wrote:
I've noticed this is still an issue. Will this be fixed in a future
version? Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEGAVCLPTU5TXDZNKLA5KDTFJSRBANCNFSM4GQO3YDQ>
.
|
Is this issue fixed? |
Google Chrome Audits returns an Error:
"Uses Passive Event Listeners to Improve Scrolling Performance"
More Information -> https://developers.google.com/web/tools/lighthouse/audits/passive-event-listeners
The text was updated successfully, but these errors were encountered: