-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use color picker library to fix problems with Firefox #6488
Conversation
…events (will act weird in Chrome when opening the color picker and closing it without changing a color)
it's now deployed at https://fixcolorpicker.webknossos.xyz/ |
import { Popover } from "antd"; | ||
import * as Utils from "libs/utils"; | ||
import { HexColorInput, HexColorPicker } from "react-colorful"; | ||
import useThrottledCallback from "beautiful-react-hooks/useThrottledCallback"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool library 🤩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Works like charm. Test with FF, Safari and Chrome on Mac.
<ThrottledColorPicker color={color} onChange={onChangeColor} /> | ||
); | ||
return ( | ||
<Popover content={content} trigger="click" overlayStyle={{ zIndex: 10000 }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 that's capturing how I felt while adding that really well
URL of deployed dev instance (used for testing):
Steps to test:
Issues: