react-slider icon indicating copy to clipboard operation
react-slider copied to clipboard

Adding and removing the mouse and touch events should be at DOM element level instead of document

Open jpatel3 opened this issue 9 years ago • 1 comments

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 avatar Jun 29 '15 22:06 jpatel3

@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).

methodofaction avatar Jul 21 '15 20:07 methodofaction