-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onMouseUp not working if you drag outside of the component #199
Comments
Hi, if you need still fix it, i have a stupid solution Add new state Add mouseDown listener on color-picker component And effect
If you have a better solution, I'd be grateful to see it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to have 2 pieces of state. One updates in real time as you drag on the colour picker, and the other only updates when you release the drag (ie you've finished choosing).
This code works except when you drag the mouse out of the component. In that case
color
updates butcolorFinal
does not.https://codesandbox.io/s/funny-wind-y65ivg?file=/src/App.js:0-555
Screen recording of the issue: https://www.loom.com/share/0d4ad40582d64ccf94d0454e74d6fbe9
Is there an event that could be used instead of or as well as
onMouseUp
?The text was updated successfully, but these errors were encountered: