Skip to content

Disconnecting nested c-shaped blocks causes blocks to disappear #8189

@FlorianTschimben

Description

@FlorianTschimben

Check for duplicates

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

Description

image
I created this Structure and when i drag the 2nd loop (count with i...) out of the outer loop, everything in it disappears, but the output code stays the same.
image

Reproduction steps

Build from Inside out

  1. Recreate a structure with multiple loops in it like in the first picture
  2. drag the second loop out of the first loop
  3. watch the blocks disappear

Stack trace

block_svg.ts:298  Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at BlockSvg$$module$build$src$core$block_svg.setParent (file:///C:/PSBlockly/blockly/blockly_compressed.js:1225:28)
    at RenderedConnection$$module$build$src$core$rendered_connection.disconnectInternal (file:///C:/PSBlockly/blockly/blockly_compressed.js:960:417)
    at RenderedConnection$$module$build$src$core$rendered_connection.disconnectInternal (file:///C:/PSBlockly/blockly/blockly_compressed.js:1204:479)
    at RenderedConnection$$module$build$src$core$rendered_connection.disconnect (file:///C:/PSBlockly/blockly/blockly_compressed.js:959:323)
    at BlockSvg$$module$build$src$core$block_svg.unplugFromStack_ (file:///C:/PSBlockly/blockly/blockly_compressed.js:977:134)
    at BlockSvg$$module$build$src$core$block_svg.unplug (file:///C:/PSBlockly/blockly/blockly_compressed.js:975:342)
    at InsertionMarkerPreviewer$$module$build$src$core$insertion_marker_previewer.hideInsertionMarker (file:///C:/PSBlockly/blockly/blockly_compressed.js:1387:315)
    at InsertionMarkerPreviewer$$module$build$src$core$insertion_marker_previewer.hidePreview (file:///C:/PSBlockly/blockly/blockly_compressed.js:1386:486)
    at BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy.updateConnectionPreview (file:///C:/PSBlockly/blockly/blockly_compressed.js:1215:492)
    at BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy.drag (file:///C:/PSBlockly/blockly/blockly_compressed.js:1214:256)

Screenshots

No response

Browsers

No response

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions