Skip to content
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

Does not use passive listeners to improve scrolling performance #2284

Closed
mauriciolauffer opened this issue Nov 8, 2018 · 2 comments
Closed

Comments

@mauriciolauffer
Copy link
Contributor

OpenUI5 version: all

Browser/version (+device/version): Google Chrome

URL (minimal example if possible):
https://openui5.hana.ondemand.com/test-resources/sap/m/demokit/master-detail/webapp/test/mockServer.html

Steps to reproduce the problem:

  1. Open Master-Detail Template App in Google Chrome
  2. Open Developer Tools (F12)
  3. Select Audits tab
  4. Run Audits
  5. Check results' Best Practices section

What is the expected result?
Message "Does not use passive listeners to improve scrolling performance" should not be listed.

What happens instead?
Message "Does not use passive listeners to improve scrolling performance" is listed.

Any other information? (attach screenshot if possible)
image

https://developers.google.com/web/tools/lighthouse/audits/passive-event-listeners

@Shtilianova
Copy link
Contributor

Hello @mauriciolauffer ,
Thank you for sharing this finding. I've created an internal incident 1880716535. The status of the issue will be updated here in GitHub.
Regards, Diana

@matz3
Copy link
Member

matz3 commented Nov 20, 2018

@mauriciolauffer In the example I can see two different places where the warning is triggered from.
One in the general event handler within sap/ui/core/UIArea and one within sap/m/SearchField.

The one in the SearchField can't be changed as the handler calls "preventDefault" (see

oEvent.preventDefault();
).

The one in UIArea is using jQuery, which is currently not even capable of using "passive:true" (see jquery/jquery#2871). And even when we would switch to native events (which doesn't seem to be straight-forward), we would need to know whether any of the event handlers requires to call "preventDefault".

So I don't see any easy solution to this. Closing this as "wontfix" but I'm open for any other ideas or feedback. Maybe I missed something here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants