Skip to content

Detached shadow block in workspace + Uncaught TypeError: Cannot read property 'isShadow' of null #4847

@4n70w4

Description

@4n70w4

Describe the bug

Detached shadow block in workspace. These blocks cannot be moved, attached, or deleted.

To Reproduce

Steps to reproduce the behavior:

  1. Add to toolbox:
'blockxml' => '<block type="lists_create_with">
          <mutation items="2"></mutation>
                    <value name="ADD0">
            <shadow type="text">
              <field name="TEXT">abc</field>
            </shadow>
          </value>
                              <value name="ADD1">
            <shadow type="text">
              <field name="TEXT">def</field>
            </shadow>
          </value>
        </block>',
  1. Add this lists_create_with to workspace
  2. Click gear icon to change mutations
  3. Delete any item in list in mutation popup
  4. Close mutation popup
  5. See detached shadow block in workspace
  6. Click at this detached shadow block
  7. See in console:
Uncaught TypeError: Cannot read property 'isShadow' of null

Expected behavior

For example: these blocks can be moved, attached or removed.

Screenshots

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 90.0.4430.212

Stack Traces

Uncaught TypeError: Cannot read property 'isShadow' of null
    at t.TouchGesture.t.Gesture.setTargetBlock_
    at t.TouchGesture.t.Gesture.setTargetBlock_
    at t.TouchGesture.t.Gesture.setStartBlock
    at t.TouchGesture.t.Gesture.handleBlockStart
    at t.BlockSvg.onMouseDown_
    at SVGGElement.l

Additional context

blockly@5.20210325.1
blockly@4.20201217.0
blockly@3.20200924.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions