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

Can't scroll on mobile #12

Open
chrisjbrown opened this issue Nov 7, 2016 · 17 comments
Open

Can't scroll on mobile #12

chrisjbrown opened this issue Nov 7, 2016 · 17 comments

Comments

@chrisjbrown
Copy link

On a mobile device or in chrome dev tools emulating a device I cannot scroll. Scrolling up does nothing and scrolling down activates the pull to refresh.

@simonxeko
Copy link

simonxeko commented Nov 8, 2016

I stumbled across this library yesterday and tried to use it on our web app.
This seems to be a hammerjs ( the touch control library used by this ) problem. If you use inspector to cancel the css props on .refresh-view this component generated ( user-select, user-drag, touch-action ), you will be able to scroll again, but it might become a little buggy in desktop browsers.

So to use this lib you might need to fork your own hammerjs or request hammerjs to provide an option to disable those css props.

@goshcc
Copy link

goshcc commented Nov 16, 2016

How to reslove

@XSlemX
Copy link

XSlemX commented Nov 18, 2016

@goshcc, as @simonxeko points out, this is a due to the default touch-action in hammerjs is 'none'. A fix could be to set the default to 'pan-y'. Like this:
let hammer = require('hammerjs'); hammer.defaults.touchAction = 'pan-y';

This might not be the best solution, but will fix your immediate problem.

EDIT: Ignore proposed solution. Will break how the component works.

@aplanchamp
Copy link

@bryaneaton13 hello :) any idea if and when this issue will be fixed ?
Thanks

@robinsonlam
Copy link

hi, has anyone addressed this issue?

@KevenGarnet
Copy link

I also encountered the same problem, I ask you to solve it?

@idesignpixels
Copy link

This solution breaks the pull to fresh behaviour on mine.

@CruxCv
Copy link

CruxCv commented May 16, 2017

nanshou

@JTorr
Copy link

JTorr commented Dec 21, 2017

Has anyone come up with a solution to this?

@JordanForeman
Copy link

bump

@princewck
Copy link

I forked this repo and made a hack to solve this, if this hack solution may help u .
https://www.npmjs.com/package/react-pull2refresh

@hectorhottomali
Copy link

I tried your repo @princewck, but I still have an issue, when I pull down the handler does get called, however the issue is with the scroll, so if scroll down on a screen when you try to scroll back up or pulling the screen down just to move the page the handler gets called and I cant move the screen "up".

To scroll correctly I need to "pull up" a little bit and then "pull down/scroll" (all in one touch movement).

@princewck
Copy link

@hectorhottomali yes, I finally tried other alternatives and pulltorefreshjs this package solved my problem.

@michaelpeterlee
Copy link

We experience the same problem on iOS and Android web view.

@michaelpeterlee
Copy link

https://www.npmjs.com/package/pulltorefreshjs also does not work with Cordova web-view.
Folks may like to look at how Ionic V1 solved this problem.

@s10mcow
Copy link

s10mcow commented Jul 24, 2019

Isnt pull to refresh typically thought of as a mobile thing, and it doesnt work on mobile... sofaking confused.

@redclouddrailan
Copy link

use this https://thmsgbrt.github.io/react-simple-pull-to-refresh/ this works on mobile too.

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