blockly-samples
blockly-samples copied to clipboard
`FieldColour` colour picker not navigable if current value is not on the palette
trafficstars
Check for duplicates
- [x] I have searched for similar issues before opening a new one.
Component
@blockly/field-colour
Description
If the current value of of a FieldColour is not one of the colours on the palette in the colour picker, it is not possible to navigate the palette using the cursor keys.
Reproduction steps
- Go to the demo page for the
field-colourplugin. - Drag the simple colour value block (second block in the toolbox) onto the workspace.
- Click on the colour field to open the colour picker.
- Use the cursor keys to move the selection around the palette. Note that this works as expected (unless you go to the top-left corner of the grid; see #2477).
- Press enter to pick a new colour, or press escape to cancel.
- Open the browser's JS console and enter the following code:
Blockly.getMainWorkspace().getTopBlocks()[0].getField('COLOUR').setValue('#123456'); - Again click on the colour field to open the colour picker.
- Note that now the cursor keys have no effect.
- Click on any colour to choose it.
- Repeat steps 3–5 and note the picker now responds to cursor keys again.
Stack trace
Screenshots
No response
Possibly related to #2477