Color Picker: Problem with HEX copy & paste #37018
Labels
[Feature] Colors
Color management
[Feature] Component System
WordPress component system
[Type] Bug
An existing feature does not function as intended
Description
Hex code pastes incorrectly when I copy a HEX color from one block and try to paste it into another
Step-by-step reproduction instructions
Create a couple of blocks in different customized colors
Copy the hex code from one block:
Paste into the hex code for another block
Note the hex box includes a # in front and only allows six characters, but the paste includes a #. The seventh character gets cut off, and we end up with an invalid hex color, so it defaults to black.
To work around, I have to paste the code somewhere else, then copy it again without the #.
Could we adjust the box so that it can handle a #, as well as two more characters for alpha if there is one?
Screenshots, screen recording, code snippet
You can see a vide of the bug here:
https://cloudup.com/cJD1MDyAEBZ (download original if needed)
And a screenshot (though it's less clear) here
e
That color is supposed to be a pale pink, but the last character of the code gets cut off.
Environment info
Browser and OS doesn't seem to matter, as a forum volunteer duplicated this on her system. I noticed the problem this morning on WordPress.com; she noticed it and reported it as well here. It's also happening on a .org installation with Gutenberg.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: