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

fix onWheel preventDefault() on Chrome >= v73 #8

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

Fonger
Copy link
Contributor

@Fonger Fonger commented Apr 3, 2019

.preventDefault() doesn't work on onWheel on Chrome > v73
This will cause parent element scrolling during zooming by mouse wheel.

Thanks for this great HOC but this bug is blocking us from using it.
Hope you can merge this or you can propose a better fix :)

P.S. Setting css touch-action: none doesn't work either.

Reference:
facebook/react#14856
https://www.chromestatus.com/features/6662647093133312

@Fonger Fonger force-pushed the chrome-v73-wheel-fix branch from 4f8c830 to b44359c Compare April 3, 2019 13:42
@woutervh-
Copy link
Owner

Thank you @Fonger for the quick fix. I will merge it and release a new version.

@woutervh- woutervh- merged commit ca30a71 into woutervh-:master Apr 3, 2019
@woutervh-
Copy link
Owner

Hi @Fonger

I have released two new versions:
1.4.1 which is compatible with React >= 15 which is using a findDOMNode to place the wheel listener
2.0.0 which is compatible with React >= 16.3 which is using your method of using createRef

Thanks again for the PR :)

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

Successfully merging this pull request may close these issues.

2 participants