Color Picker closes when keypressed #3452
Labels
Area:Editor
For CodeMirror-related features
Bug
Error or unexpected behaviors
On Hold
Work on this issue is paused for now
p5.js version
1.11.1
What is your operating system?
None
Web browser and version
135.0.7049.41 (Official Build) (arm64)
Actual Behavior
Using the color picker, any keypress in the color picker editable input fields results in the colorpicker closing, making it very easy to create NaN values in the string color representation.
Then, switching between color modes by clicking on the bar results in badly malformed strings:
Expected Behavior
I expect that if a text field looks editable, it is editable. I expect that the color picker can only generate valid colors.
It is still totally possible to recover from error and use all the other features of the color picker, though! In this case, I used it instinctively because it looked possible, but I actually don't think the color picker needs to have editable text fields. This bug feels easy to recover from.
Steps to reproduce
Steps:
background('#000')
to create color picker buttonNaN
in the resulting new color valuehsla(0,0%,0%,NaN)(0,0%,0%,NaN)(0,0,0,NaN)
The text was updated successfully, but these errors were encountered: