Skip to content

Dropping blocks into the flyout can delete the blocks behind it #10281

Description

@nimeratus

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

This is scratchfoundation/scratch-blocks#3654 but it also happens in Blockly

When dragging a block into the flyout, it can connect to the blocks behind it and cause them to also be deleted. I would expect that only the dragged block is deleted

A similar bug can also happen when dragging blocks to the trash can icon at the bottom right corner, if something is behind the trash can

Reproduction steps

  1. Go to the Blockly Playground
  2. Place some blocks close to the flyout
  3. Place some blocks far away from the flyout
  4. Scroll the workspace so that blocks go behind the flyout
  5. Drag a block to the top of a block behind the flyout
  6. See that not only the block you dragged gets deleted, but also the block(s) that it connects to

Priority

Work effort: idk

Workarounds:

  • if the bug already happened: undo (the problem with this is that it doesn't work if you notice it too late)
  • to prevent the bug: only use the keyboard and the context menu for deleting blocks

Stack trace

Screenshots

block-deletion.webm

Browsers

Chrome desktop, Android mobile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions