react-slider
react-slider copied to clipboard
Adding and removing the mouse and touch events should be at DOM element level instead of document
Instead of adding and removing the touch and mouse events at the 'document' level, do it at DOMNode level - document.addEventListener to this.getDOMNode().addEventListener document.removeEventListener to this.getDOMNode().removeEventListener
to avoid getting sliderUpdater called all the time when clicked on outside of the React Component. Let me know if I am overlooking anything.
@jpatel3 in drag and drop code the move
and end
or up
are bind to the document or window because the user initiates the drag at the node level, but the dragging doesn't stop until the user releases the click or lifts up his finger (even if it's outside the component area).