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
TimeView .rdtBtn fired twice on mobile devices #525
Comments
Experiencing this issue too when trying to integrate time picker into a form |
Any solution for that? |
Which mobile device? |
All iOS devices I suppose.
I tested on iPhone SE & iPad
…________________________________
From: Rikki Tooley <notifications@github.com>
Sent: Friday, March 2, 2018 11:57:22 AM
To: YouCanBookMe/react-datetime
Cc: Nicolas Sandron; Author
Subject: Re: [YouCanBookMe/react-datetime] TimeView .rdtBtn fired twice on mobile devices (#525)
Which mobile device?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#525 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACqGLGtiZJUR3goG48YeJuYZYL3DaLGBks5taSWSgaJpZM4SP_D->.
|
My issue is also coming out of IOS devices. Tested on Iphone 6 plus and 2017 ipad |
Same to me! It seems to fire "onmousedown" and "onmouseup" events separately instead of a single "onclick" on all iOS touch devices. (tested on iPhone 5/6/8 and iPad). |
This is happening in all the touch devices because of the duplicate event listeners (onTouchStart & onMouseDown). I think caused by this PR - #506. onTouchStart event listener should be removed from the code as the touch devices support onMouseDown event. |
Hey, any update on this issue? |
I am experiencing same issue too.. Any quick fix for this? |
while we are waiting for PR request, did anyone find a workaround? |
Increment a var by 1 at each click but only update your date on even (or odd) values. |
I'm working on a react project so I just added a boolean 'incremented' to state and toggle it on/off on every change. It runs smoothly, but now it only works on mobile. This is for Cordova so I can live with it. but would be awesome if someone could approve the pr to fix this. |
I'm experiencing the same issue |
There is a pull request for this since March. How hard is it to accept it? |
Any Update on this PR? |
I just performed the fix mentioned at the top - go into timeView.js and remove all |
Remove onTouchStart attribute when used together with onMouseDown to Fix Issue #525
We have released a new version with the changes in it. I hope it fixes the issue! Thanks everybody for you work! |
I'm Submitting a ...
Steps to Reproduce
Run the TimeView component on a mobile device
Hit any of the arrows buttons in order to change hours or minutes
Expected Results
Values should be increased/decreased only once at a time
Actual Results
Values are increased/decreased twice at a time
Other Information (e.g. stacktraces, related issues, suggestions how to fix)
I suppose the issue comes from this portion of code, where onTouchStart and onMouseDown might both fired on mobile devices
onTouchStart: this.onStartClicking('increase', type), onMouseDown: this.onStartClicking( 'increase', type )
The text was updated successfully, but these errors were encountered: