SanderSpies/react-material — pull request #65 by rivol (2014-11-17 20:58:37+00:00)
Title: Fix draggable clickable elements (e.g. buttons, list items)

Related to #15

I have a scrollable List with clickable ListItems in it. Previously when I scrolled the list on a touch device, the onClick handler of a list item was triggered. Not anymore.

I wasn't sure about how to best tackle this, so this is a very simple patch that uses state to keep track of whether any mouseMove events occurred before the mouseUp. If yes, then we won't call the onClick handler.
A way to improve on this would be keeping track of the cursor position (should it also be done with state?) and suppressing the onClick only if distance moved is greater than e.g. 4px.
Let me know if you have any suggestions, etc.