blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Bitmap field cursor improvements

Open maribethb opened this issue 2 years ago • 1 comments

Category

  • Plugins

Component field-bitmap

Is your feature request related to a problem? Please describe.

  • Sometimes when trying to "paint" the squares, the browser tries to activate "drag and drop" mode and stops you from painting
  • the cursor is always the "drag" cursor like when you hover over other parts of the block, so it's not obvious you can click on the field to edit it (compare to a text input field, for example)

Describe the solution you'd like

  • [x] disable drag and drop mode for this element (there are various methods such as preventing default on mousedown or on dragstart) - fixed by #1205
  • [ ] set the cursor for the element to a different one that indicates you can click on the field (not drag)

Additional context

To work on this issue, first read the background information about how to contribute to samples and verify your changes.

The field-bitmap plugin is a custom field in Blockly. The custom fields API allows one to change the cursor when the user is hovering over the field by setting the CURSOR property. So, to fix this issue, you need to set the CURSOR property of the field to the string'default' which corresponds to the css value for the default mouse pointer.

Be sure to validate your changes as described in the Contributing docs.

maribethb avatar Jun 18 '22 00:06 maribethb

I would like to work on this! 😃

Vortue avatar Sep 16 '22 20:09 Vortue