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

Make eventlisteners passive #8

Open
0xhtml opened this issue Jun 14, 2023 · 3 comments
Open

Make eventlisteners passive #8

0xhtml opened this issue Jun 14, 2023 · 3 comments

Comments

@0xhtml
Copy link

0xhtml commented Jun 14, 2023

Chrome DevTools suggest marking the eventlisteners on touch, scroll etc. events as passive, as long as the listeners don't need to cancel the event, to improve performance. I would think that doing so might slightly improve performance and would at least silence the devtools complaining.

@leofeyer
Copy link
Member

Can you create a pull request with the necessary changes?

@0xhtml
Copy link
Author

0xhtml commented Jun 18, 2023

I implemented the passive event listeners 0xhtml@5d7883c and the chrome devtools no longer complain. However, there seems to be a bug in Firefox with the non-passive touchmove event listener that is registered inside the now passive touchstart event listener: As far as I can tell is the cancellation of scrolling is not working even though the touchmove event is registered as non-passive and therefore should be cancelable. Works in chrome though.

@0xhtml
Copy link
Author

0xhtml commented Jun 19, 2023

Reported the bug to Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1839095

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

No branches or pull requests

2 participants