-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ColorPicker goes transparant when no value is entered into ColorField #6363
Comments
Looks like when parsing the value, we're replacing
This doesn't make much sense since |
After a second look, I think the parsing |
Provide a general summary of the issue here
In your example documentation for building a Color Picker using a Color Area, Field, Swatch and Slider, if you delete the content in the Color Field so the the field is left blank and then blur the input the value gets automatically changed to "#000000", and the swatch changes to transparant in colour.
If you then try to move the slider or area selection around, the hex value is updated in the field component, but the swatch remains showing a transparant colour.
The only way to stop the swatch from being transparant is to type a value manually into the ColorField, which then causes it to update correctly.
🤔 Expected Behavior?
When the field value is set automatically to #000000 I would expect the swatch to be black not transparant, I would also expect the swatch to update correctly when the sliders are moved after such an action.
😯 Current Behavior
Color Picker incorrectly sets colour on swatch to transparant and then doesn't update correctly.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Go to https://react-spectrum.adobe.com/react-aria/ColorPicker.html and open the first example colour picker.
Delete the content in the colour field input and then try to change colour using the slider or colour area.
Version
1.2.0 of aria-components
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: