react-fastclick icon indicating copy to clipboard operation
react-fastclick copied to clipboard

unexpected page reload when using with react router

Open hcapp01 opened this issue 8 years ago • 10 comments

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} >

hcapp01 avatar Jun 30 '16 22:06 hcapp01

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

joe-schorn avatar Jan 30 '17 22:01 joe-schorn

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

JakeSidSmith avatar Jan 31 '17 12:01 JakeSidSmith

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

joe-schorn avatar Jan 31 '17 14:01 joe-schorn

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?

JakeSidSmith avatar Jan 31 '17 14:01 JakeSidSmith

@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!

joe-schorn avatar Feb 09 '17 17:02 joe-schorn

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

JakeSidSmith avatar Feb 13 '17 10:02 JakeSidSmith

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

https://github.com/JakeSidSmith/react-fastclick/pull/50

JakeSidSmith avatar May 20 '17 22:05 JakeSidSmith

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

fjaskolski avatar Jul 13 '17 11:07 fjaskolski

Reopening to investigate further.

JakeSidSmith avatar Oct 29 '17 13:10 JakeSidSmith

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

samcfinan avatar May 30 '18 01:05 samcfinan