Skip to content
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

Unintentional color picker is appearing if one of the property value is "field" #1576

Open
pranavkumar389 opened this issue Feb 21, 2024 · 5 comments
Labels

Comments

@pranavkumar389
Copy link

pranavkumar389 commented Feb 21, 2024

Unintentional color picker is appearing if one of the property value is "field"

image

Here is a code sample to replicate the issue.https://codesandbox.io/p/sandbox/jolly-gwen-9twh8v?file=%2Fsrc%2FApp.js%3A9%2C1-9%2C48

@josdejong
Copy link
Owner

Thanks for reporting. That is odd indeed!

I'm not sure why "field" is considered a valid color name in CSS, I've asked on StackOverflow:

https://stackoverflow.com/questions/78035304/why-is-field-a-valid-color-name-in-css

@josdejong josdejong added the bug label Feb 21, 2024
@josdejong
Copy link
Owner

@pranavkumar389
Copy link
Author

pranavkumar389 commented Feb 22, 2024

Understood the issue, but even if the value is red instead of field it renders the color picker. I am expecting red should be rendered as red but not with an input to pick color.

Is there a way to disable the color picker? @josdejong

@josdejong
Copy link
Owner

It's a bug, we need to to fix this. Step one is to figure out what's going wrong, that's clear now. Step two is to solve it.

You can indeed disable the color picker by adding some CSS with display: none on the class name of the color picker element. There is only one downside: the text is not colored like other string texts because it is (still) detected as a color.

@pranavkumar389
Copy link
Author

Of course we can remove the color picker with display: none. But as you mentioned text color will not be of string one.
I was looking for any option to disable this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants