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

unexpected page reload when using with react router #34

Open
hcapp01 opened this issue Jun 30, 2016 · 10 comments · Fixed by #50 · May be fixed by #56
Open

unexpected page reload when using with react router #34

hcapp01 opened this issue Jun 30, 2016 · 10 comments · Fixed by #50 · May be fixed by #56

Comments

@hcapp01
Copy link

hcapp01 commented Jun 30, 2016

react router 2.3
ios 9.1
longpress on link like this will reload page

<Link style={{ paddingBottom: 8 }} className={className} key={key} to={'/' + classDef.path + '/' + key} >

@joe-schorn
Copy link

Commenting out this line seems to fix it:
newProps.onTouchMove = onTouchMove.bind(null, props.onTouchMove);

@JakeSidSmith
Copy link
Owner

I've had a couple of similar issues reported, but never been able to reproduce. Would either of you be able to put together a small test project with the issue that I can debug on?

Thanks for taking a look into the code @joe-schorn. I'll be sure to see if onTouchMove is the culprit, and if there's some way I can fix without removing it that callback.

@hcapp01 @joe-schorn

@joe-schorn
Copy link

@JakeSidSmith sure no problem. I've should be able to get a test project for you tomorrow.

@JakeSidSmith
Copy link
Owner

JakeSidSmith commented Jan 31, 2017

Awesome, thanks for the help. Link me from here when you've got a lil project setup, @joe-schorn . :)

P.s. have you been able to reproduce on an emulator?

@joe-schorn
Copy link

@JakeSidSmith Sorry I got slammed at work. When I put a project together and pulled the latest 3.0.1, it seems to be resolved. I had an older version in the other project I was working on. I pulled the latest and it's working there too. When I did see the issue I was able to replicate it in the emulator. Thanks again for the lib and for your help!

@JakeSidSmith
Copy link
Owner

No problem. I'll double check with people that have opened similar issues before closing this one off. :)

@JakeSidSmith
Copy link
Owner

Please try the alpha version I've just released and let me know if it resolves your issues. :)

#50

@fjaskolski
Copy link

Hello there!

I've run into the exact same issue while using:
react-router-dom 4.1.1 (react-router 4.1.1)
react-fastclick 3.0.2

The page reloads on clicks performed randomly (long press, sometimes short double tap), both at iOS 10.0.2 and within Chrome devtools device view.

I'm wondering if you have any ideas on how can I debug this further?

Cheers

@JakeSidSmith
Copy link
Owner

Reopening to investigate further.

@JakeSidSmith JakeSidSmith reopened this Oct 29, 2017
@JakeSidSmith JakeSidSmith linked a pull request Oct 29, 2017 that will close this issue
3 tasks
@samcfinan
Copy link

Same issue here. react-router-dom 4.2.2. Disabling react-fastclick resumes normal behavior.

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