Amphtml: [amp-sidebar-0.1.js] Does not use passive listeners to improve scrolling performance

Created on 4 Dec 2019  路  3Comments  路  Source: ampproject/amphtml

Chrome Audits reports for Best Practices

image

amp-sidebar When Possible Performance Bug components

Most helpful comment

what status is this issue ?
on the project, the status is "Done". but i could not find the PR.

All 3 comments

The only touch listener is here:

https://github.com/ampproject/amphtml/blob/d9015fe61b6ccecfc6c2d2cfccf33cdfb396cabd/extensions/amp-sidebar/0.1/amp-sidebar.js#L611-L613

Which cannot be passive, since it calls preventDefault().

There is no context on the code, but if I had to guess, it was probably to prevent swiping on the mask scrolling the document, it seems to have been there from the start. Since the page is made position: fixed when we open the sidebar, I think it should be safe to just remove this.

Closing in favor of #26203

what status is this issue ?
on the project, the status is "Done". but i could not find the PR.

Was this page helpful?
0 / 5 - 0 ratings