omgovich / react-colorful

🎨 A tiny (2,8 KB) color picker component for React and Preact apps
https://omgovich.github.io/react-colorful
MIT License
3.19k stars 100 forks source link

Conflict when used within modal #202

Open kilimandzharov opened 1 year ago

kilimandzharov commented 1 year ago

I use your HexColorPicker in modal, which can be swiped down on mobile devices. When I start dragging pointer down, modal thinks that I wanna swipe it. So I added event listener on the div container of HexColorPicker, which stops propagation of touch events. But this disables all the functionality of HexColorPicker. I suggest you to add second argument event to the onChange prop, like in react-color. If there is another way of avoiding this situation, write it down, if you can). Thanks for your time.