react-swipeable
react-swipeable copied to clipboard
Conflict with type range input
Description of the bug An input of type range has a draggable functionality to it which, while being used, shouldn't trigger a swiping event.
Steps to reproduce Insert an type range input inside the parent component with the swipeable handlers and drag the input's "thumb" (left or right, if horizontal, or up and down, if vertical) to change the value.
Expected behavior Swiping over the parent component should trigger a swiping event, but dragging the range input's "thumb" shouldn't.
@filipealonso Thank you for the write up!
🤔 whoaa.. this is interesting.... If you could create an example we could see the bug in that would be incredibly helpful in debugging. You could fork the hook example here to get started hook example codesandbox.io
Same issue here. Any range input inside a swipeable container will trigger the swiping once you let go.
I tried event.stopPropagation in the onChange handler of the input, but no luck.