Archived topic
Passive listeners to improve scrolling performance
10 replies · Started by Uwe on January 30, 2020
Hello Support-Team,
I made a lighthouse analyze.
One of the errors was this:
"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.
I am not a specialist and do not know is this error about of the theme or in WordPress?
Do you know how to resolve the problem?
Hi there,
its a WordPress 'bug' - there is a ticket open relating to a fix for this:
https://core.trac.wordpress.org/ticket/47510
It's not an issue i would be overly concerned about.
Danke David!
You're welcome
Looks like that bug isn't getting fixed anytime soon. I have placed some javascript in my footer that works.
I not sure if posting that code here is a good idea so this is the link to the page.
Wordpress and best practice with passive event listeners
Cheers!
Thanks for sharing Grant :)
Bad news! The new version (beta - rc3) of WordPress does not seem to fix this issue. My code posted still works great.
Hello, Grant.
How do you insert that code? Can you show me, I'm not developer. Thanks
I tried the javascript code above and it broke the primary navigation when I used submenus.
I tried this code here on this page and it seems to work fine
https://dtlytics.com/2020/11/does-not-use-passive-listeners-solved/
Another words the first solution doesn't seem to be compatible with GeneratePress while the second one is.
Thanks for sharing!
The code I posted doesn't assume that you use jQuery. People should use what works for them.
Cheers!