Closed Elijen closed 7 years ago
That surprises me, had an issue with this a while ago, but I thought it had been fixed. Can I get some more info from you?
What router are you using? What elements / components are causing the issue? (the one clicked to change route, and the second element that a click is triggered on) What version of React are you using?
Router: react-router
+ react-router-redux
Elements: button
(changes route) -> textarea
(probably same with input
)
react: v15.1.0
react-dom: v15.1.0
react-fastclick: v2.1.1
Hmmm, this is very odd (as it does seem like a bug I've already fixed). I've just pushed some changes to fix a warning / bug in React 15 to #31.
Would you be able to try your project with that branch and see if it fixes your problem?
@Elijen Did you get a chance to try with the branch mentioned above?
Hi. We're seeing the same issue in our solution but only on older devices, specifically Android 4.2.2 and older. We're using an HTC One X to re-produce the issue. Hope this can be of help in tracking this down.
I am using react 0.14 and this issue still persists.This occurs on IOS 9.3 . I am implementing this in a cordova application.
@rahulinaction i ran into the same problem as you. Looked into it a bit today, and submitted a PR for a fix that solves my problem. Take a look and see if it solves your problem too?
Is everyone experiencing this issue using react-router?
Could I get some more info from some of you. :)
I'm not using react router. I'm using a pretty simple custom redux based router.
<button>
<button>
I can't reproduce this. :/ Does the second button have an onClick
or is it a submit button?
Alternatively, has anyone got time to setup a little example repo that I can work on?
I am also experiencing this issue, and using react-router. I fixed by using a <button onClick={}>
instead of <a onClick={}>
Can we ensure that we can exclude fast click for certain elements for example removing fast click support for select elements . Is there a way where in I exclude fast click for specific elements
@JakeSidSmith Sorry for late reply. I actually stopped using react-fastclick
because I found out the original FastClick library works just fine with React and offers much more robust solution. It's surprisingly hard to implement this right (many cross-element, cross-browser and cross-platform differences).
We were experiencing a similar problem in AngularJS. The root of the issue was the fact that an element used for a Selector condition check was removed from DOM (page re-rendered because of route change) so matchesSelector
check failed. I suspect it could be something similar here.
@JakeSidSmith You will be able to replicate this issue mostly in mobiles. If you create a form with input fields and selectboxes randomly adding 2 input fields followed by 2 select input you might be able to replicate it. I for the timebeing disabled fastclick for the input fields and the select.
Anyone still using react-fastclick and react-router, could you try the alpha version I've just released and let me know if it's fixed your issue. :)
When user clicks an element that causes re-render (e.g. react-route change) element that appears after the re-render right under the tapped position receives a click event too.