microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
727 stars 638 forks source link

Unexpected block jump when dragging from the toolbox #5998

Open microbit-matt-hillsdon opened 1 month ago

microbit-matt-hillsdon commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

(Easier via GIF below)

  1. Go to MakeCode, new project
  2. Add show string "some long string here" to on start
  3. Move forever just to the right of the wider on start block
  4. Drag an "on button" block from the toolbox over the workspace
  5. Observe that "on start" has jumped right a bit and now overlaps forever

After triggering this once, right-click "Format Code" is one way to be able to trigger it again.

This can be more confusing in large projects when you can come back from working over on the right to find your blocks don't look quite how you left them. Our education team encountered this building example projects.

The longer text is just so you can see the move when the toolbox is open.

Similar feel to #5959, but in that case all the blocks move which isn't so bad. I've encountered both of these issues one after the other which can feel quite odd/broken.

Expected behavior The blocks stay where you left them.

Screenshots Image

Desktop (please complete the following information):