Implement passive listeners in jQuery to improve scrolling performance

Created on 2 August 2022, over 2 years ago
Updated 11 January 2024, 11 months ago

Problem/Motivation

When running web.dev or Lighthouse on my Drupal 9 site, I get the following:

Does not use passive listeners to improve scrolling performance

The file is core/assets/vendor/jquery/jquery.min.js

Jquery 4 is looking at passive listeners: https://github.com/jquery/jquery/issues/2871

Great article:
https://screpy.com/passive-event-listeners/

Steps to reproduce

Run page speed/lighthouse on a page containing jQuery

Proposed resolution

Add a fix/shim JS file that makes required evnt listeners passive when possible, see https://stackoverflow.com/a/62177358

Remaining tasks

Review the patch

User interface changes

None

API changes

?

Data model changes

None

Release notes snippet

?

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
JavascriptΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024