react-selectable
react-selectable copied to clipboard
Added support for touch-based (mobile) events.
@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.
@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:
ReactDOM.findDOMNode(this).addEventListener('mousedown', this._mouseDown);
ReactDOM.findDOMNode(this).addEventListener('touchstart', this._mouseDown);
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 gh-pages
branch so that the example has the new touch functionality. I will push shortly.
Ok, everything is cleaned up and the gh-pages
branch is rebundled. Please let me know if you feel that any other changes should be made.
@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?