-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pull to refresh isn't disable on iOS #1
Comments
Maybe the issue on the chrome recent versions. |
This doesn't seem to work with Chrome 69.0.3497.105 on iOS 11.3. I've also tried multiple other solutions and that had seemed to work before from the reactions of others but they do not work for me for this version. Other solutions I've tried: |
we need to add { passive: false } for touch move like:
because from some version of Chrome, event listeners are default passive true. |
@apptaro Thank for your support. |
@nghiepit It's still happening just for the initial load it doesn't happen. check this https://o1l55wryq.codesandbox.io. To replicate: |
I know what's wrong. When a page is short, scrollling down (panning up) doesn't actually scroll the page, so scrolling up (panning down) will activate pull-to-refresh. https://github.com/nghiepit/prevent-pull-refresh/blob/master/index.js#L78 |
@apptaro const touchmoveHandler = event => {
if (maybePrevent) {
if (window.pageYOffset !== 0) {
maybePrevent = false;
}
if (isScrollingUp(event)) {
return event.preventDefault();
}
}
}; With me. It's still happening, same issue @shivamsupr . Thank you in advance. |
Check the codesandbox.
https://codesandbox.io/s/jp8nvvzqoy
The text was updated successfully, but these errors were encountered: