Added support for touch-based (mobile) events. - #12
Conversation
leopoldjoy
commented
Feb 16, 2016
@unclecheese Note, I added a note at the bottom of README.md linking to my extended-features fork. Please let me know if you would prefer for me to remove this. |
leopoldjoy
commented
Feb 16, 2016
@unclecheese Please let me know if you would like any additional changes made to the touch-device functionality. |
| _openSelector (e) { | ||
| _openSelector (e) { | ||
| if(this.state.mouseMoveStarted) return; | ||
| this.state.mouseMoveStarted = true; |
There was a problem hiding this comment.
This isn't the correct way to mutate state.
Does this really need to be in state? If it doesn't affect the UI, then probably not.
leopoldjoy
commented
Feb 17, 2016
@unclecheese Thanks for the feedback! I made the syntactic changes and moved the mouse event tracking booleans out of the state. In regards to your question of why we need to track the events: some devices are both click and touch enabled. On such devices the event handlers could fire twice. For example: Additionally, for the mousemove/touchmove handlers, they could be doubly firing. Due to these inconsistencies of which events fire or are supported across platforms, I thought it best to guarantee that the functions are always fired in the correct order and not duplicated. What are your thoughts on this? I am open to altering this if you feel differently about it. |
leopoldjoy
commented
Feb 17, 2016
Sorry, I had forgot to rebuild the bundle. Committed that now. I'm now working on updating the |
leopoldjoy
commented
Feb 17, 2016
Ok, everything is cleaned up and the |
leopoldjoy
commented
Feb 18, 2016
@unclecheese Please let me know if there are any additional changes you feel should be made. |
unclecheese
commented
Feb 18, 2016
Thanks! I'll have a look at it in the next few days. |
leopoldjoy
commented
Feb 25, 2016
@unclecheese Did you get a chance to look through the changes? Let me know if you feel any changes should be made. |
aldahick
commented
Jun 4, 2018
@unclecheese Any update on this? Love the library, but mobile users are out of luck without this. |
shubham-2710
commented
Oct 30, 2018
Any Update on this for mobile touch ? |
danielmockaitis
commented
Dec 15, 2018
Can we please mobile support with this? |
No description provided.