-
Notifications
You must be signed in to change notification settings - Fork 915
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
Chrome hex input bug #432
Comments
Also facing this issue. |
I noticed the same thing ! I also noticed that once it is switched to rgba mode, you cannot go back to Hex mode, you can only switch between rgba and hsla. I read the way you workaround this issue, but it just disables the rgb view, right ? It doesn't really fix the problem... |
@sophiemoire no, that just disables the automatic switch to rgb mode when entering hex4 (#rgba) or hex8 (#rrggbbaa). Considering that TinyColor now supports hex8 format I think the solution is to
I guess the best way to go with a quick fix is the later so you can have something like:
|
There's also an issue related to I am happy to make a PR tomorrow with a fix. Edit: looks like the |
Any progress on this? |
I encounter this issue when I press backspace 2 times. |
@nathggns @Y-WinDow unfortunately this issue has not been addressed or even acknowledged by the maintainers of the project so far. I needed to have react-color in production and the hex8 issue was a total blocker so I ended up creating a fork release with hex8 disabled in react-color. Until this issue gets resolved you can use the fork release: |
I see the issues you are running into here. I think the best course of action for now would be to invalidate hex4 and hex8. @elvisvoer could you put your fix in a PR, I would be happy to merge it. |
@elvisvoer thanks a lot! |
@casesandberg submitted PR. Thanks! |
@casesandberg any updates on the PR merge ? seems like its ready to be merged, thanks |
@casesandberg Thanks for all your work on react-color. I'm sure you are busy, but could we get an update on whether you will merge @elvisvoer 's PR from Jan 12? I'd rather not switch to a fork of react-color, but this bug is going to force me to if the PR is not merged. |
If you input #fafa color into hex field of chrome color picker it will switch to rgba mode and put the #fafa into R field.
The desired behavior is to stay in the hex mode to continue inputting the rest characters of the color (#fafafa for example).
The root cause of the issue is that last versions of tinycolor (1.4.1 for example) treats #fafa as a valid color that equals to rgba(255, 170, 255, 0.6666) and therefore Chrome colorpicker automatically switches to rgba mode. The older versions (like 1.1.2 that is used on the demo page) treat #fafa color as non-valid and therefore Chrome color picker works fine.
According to the latest specs (bgrins/TinyColor#82) #fafa is a valid 4 hex short format.
To workaround the issue I commented out "this.setState({ view: 'rgb' });" lines in componentWillReceiveProps methods of ChromeFields class in ChromeFields.js.
The text was updated successfully, but these errors were encountered: