[Support request] Passive listeners to improve scrolling performance

Home Forums Support [Support request] Passive listeners to improve scrolling performance

Home Forums Support Passive listeners to improve scrolling performance

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1148951
    Uwe

    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?

    #1149150
    David
    Staff
    Customer Support

    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.

    #1149158
    Uwe

    Danke David!

    #1149185
    David
    Staff
    Customer Support

    You’re welcome

    #1149450
    Grant

    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!

    #1149482
    David
    Staff
    Customer Support

    Thanks for sharing Grant 🙂

    #1200022
    Grant

    Bad news! The new version (beta – rc3) of WordPress does not seem to fix this issue. My code posted still works great.

    #1527113
    Juan Pablo

    Hello, Grant.

    How do you insert that code? Can you show me, I’m not developer. Thanks

    #1538548
    David

    I tried the javascript code above and it broke the primary navigation when I used submenus.

    https://stackoverflow.com/questions/45974128/wordpress-and-best-practice-with-passive-event-listeners

    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.

    #1539184
    Leo
    Staff
    Customer Support

    Thanks for sharing!

    #1540550
    Grant

    The code I posted doesn’t assume that you use jQuery. People should use what works for them.
    Cheers!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Passive listeners to improve scrolling performance’ is closed to new replies.