Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Color Picker closes when keypressed #3452

Open
Labels
Area:EditorFor CodeMirror-related features BugError or unexpected behaviors On HoldWork on this issue is paused for now
@ksen0

Description

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.

Image

Then, switching between color modes by clicking on the bar results in badly malformed strings:

Image

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:

  1. Start with background('#000') to create color picker button
  2. In color picker, put cursor into any of the RGBA values and press backspace (in my case, color picker dialog disappeared, and then there was a NaN in the resulting new color value
  3. Open color picker again and use it to change color mode. Can result in things like hsla(0,0%,0%,NaN)(0,0%,0%,NaN)(0,0,0,NaN)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:EditorFor CodeMirror-related features BugError or unexpected behaviors On HoldWork on this issue is paused for now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /