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

Wheel event listener causing performance hit while scrolling #474

Closed
danielcardoso5 opened this issue Feb 2, 2017 · 4 comments
Closed

Comments

@danielcardoso5
Copy link

danielcardoso5 commented Feb 2, 2017

A wheel event listener is added to the document element after smooch loads. This causes a performance hit while scrolling the pages where smooch.js is included.

What's the reason for this event to be added? The scroll event listener is also present and doesn't affect scrolling performance that much.

The issue can be seen in Chrome dev tools, in the rendering tab by enabling the scrolling performance issues checkbox.

@lemieux
Copy link
Member

lemieux commented Feb 2, 2017

Seems like React does that by itself based on facebook/react#1254. From what I understand from this issue is that whenever you use onWheel in your React tree, it will bind it to the document too which is not really desired.

I checked where we use onWheel and I'll bring it up to the team to see how we could work around this problem.

Thanks for the report!

@danielcardoso5
Copy link
Author

Hi @lemieux, any update on this issue?

@alavers
Copy link
Member

alavers commented Mar 7, 2017

I suspect #503 fixes this issue :)

@danielcardoso5
Copy link
Author

I can confirm that it's fixed. Thanks @alavers @lemieux :)

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

3 participants