Skip to content

Mutated procedures_ifreturn detaches child block, but undoing doesn't reattach it. #7950

@johnnesky

Description

@johnnesky

Check for duplicates

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

Description

Child connections automatically detach when a mutation removes the connection. This isn't undoable but should be.

Reproduction steps

  1. Navigate to https://blockly-demo.appspot.com/static/tests/playground.html
  2. Drag a procedures_ifreturn block to the workspace.
  3. Drag a procedures_defnoreturn block to the workspace, separately.
  4. Add a third block and attach it to the return connection of the procedures_ifreturn block.
  5. Attach the procedures_ifreturn as a stack child to the procedures_defnoreturn block. This will mutate the procedures_ifreturn and detach its own child.
  6. Undo dragging the procedures_ifreturn block. The block will move, but neither its mutation nor the detached child will get undone.

Stack trace

events_block_move.ts:290 Can't connect to non-existent input: VALUE
    run	@	events_block_move.ts:290
    undo	@	workspace.ts:658
    callback	@	shortcut_items.ts:274
    onKeyDown	@	shortcut_registry.ts:236
    onKeyDown	@	inject.ts:309
    wrapFunc	@	browser_events.ts:65

Screenshots

No response

Browsers

Chrome desktop

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions