-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add patch jquery scroll passive for mobile scrolling performance #35613
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
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @mrtuvn. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@mrtuvn does it really improves performance? Can we measure it? |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Seem this is known issue from the core jquery too. |
Note this is patch for magento side. But imho it's should be fix from jquery core then reflect back to magento. So i keep this on as draft state. Feel free to use this patch but note this should be test carefully when bring it to production evironment |
Description (*)
improve your page's scroll performance
wheel -> passive true cause listener can't block page rendering while the user is scrolling
non wheel (mobile) -> passive false
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#parameters
actually jquery core should fix this at the codebase. In the meantime we can delivery this patch at first place then replace/remove it later when upgrade jquery version to higher version contain fixes.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)