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

TimeView .rdtBtn fired twice on mobile devices #525

Closed
NicoDos opened this issue Feb 22, 2018 · 17 comments
Closed

TimeView .rdtBtn fired twice on mobile devices #525

NicoDos opened this issue Feb 22, 2018 · 17 comments
Labels

Comments

@NicoDos
Copy link
Contributor

NicoDos commented Feb 22, 2018

I'm Submitting a ...

[x] Bug report
[ ] Feature request
[ ] Support request

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 )

@Drdos3s
Copy link

Drdos3s commented Feb 25, 2018

Experiencing this issue too when trying to integrate time picker into a form

@nbudinov
Copy link

nbudinov commented Mar 2, 2018

Any solution for that?

@rikkit
Copy link

rikkit commented Mar 2, 2018

Which mobile device?

@NicoDos
Copy link
Contributor Author

NicoDos commented Mar 2, 2018 via email

@Drdos3s
Copy link

Drdos3s commented Mar 2, 2018

My issue is also coming out of IOS devices. Tested on Iphone 6 plus and 2017 ipad

@redbaron76
Copy link

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).

@wasif-danesh
Copy link

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.

@experionarjun
Copy link

Hey, any update on this issue?

@Suresh-R-S
Copy link

I am experiencing same issue too.. Any quick fix for this?

@Martsyalis
Copy link

while we are waiting for PR request, did anyone find a workaround?

@NicoDos
Copy link
Contributor Author

NicoDos commented Apr 5, 2018

Increment a var by 1 at each click but only update your date on even (or odd) values.
It was blinking a little so I reverted but maybe it works for you.

@Martsyalis
Copy link

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.

@fbedussi
Copy link

fbedussi commented May 1, 2018

I'm experiencing the same issue

@THETCR
Copy link

THETCR commented May 15, 2018

There is a pull request for this since March. How hard is it to accept it?

@shobanabalasingacube
Copy link

Any Update on this PR?

@fonty422
Copy link

fonty422 commented Jul 3, 2018

I just performed the fix mentioned at the top - go into timeView.js and remove all onTouchStart events. works on both browser and touch devices.

layneanderson added a commit that referenced this issue Jul 3, 2018
Remove onTouchStart attribute when used together with onMouseDown to Fix Issue #525
@arqex
Copy link
Owner

arqex commented Jul 24, 2018

We have released a new version with the changes in it. I hope it fixes the issue! Thanks everybody for you work!

@arqex arqex closed this as completed Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests