-
Notifications
You must be signed in to change notification settings - Fork 70
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
Added support for touch-based (mobile) events. #12
base: master
Are you sure you want to change the base?
Conversation
@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. |
@unclecheese Please let me know if you would like any additional changes made to the touch-device functionality. |
src/selectable-group.js
Outdated
_openSelector (e) { | ||
_openSelector (e) { | ||
if(this.state.mouseMoveStarted) return; | ||
this.state.mouseMoveStarted = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@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. |
Sorry, I had forgot to rebuild the bundle. Committed that now. I'm now working on updating the |
Ok, everything is cleaned up and the |
@unclecheese Please let me know if there are any additional changes you feel should be made. |
Thanks! I'll have a look at it in the next few days. |
@unclecheese Did you get a chance to look through the changes? Let me know if you feel any changes should be made. |
@unclecheese Any update on this? Love the library, but mobile users are out of luck without this. |
Any Update on this for mobile touch ? |
Can we please mobile support with this? |
No description provided.