question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mutators of shadow block lists_create_with creates extra shadow block

See original GitHub issue

Problem statement

TODO…

Expected Behavior

An empty socket should appear where the new socket was created.

Actual Behavior

image

Steps to Reproduce

Add this to the blockly playground. Add a mutator between 2 and 3. A 3 shadow block appears both in the new socket and on the workspace

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="lists_isEmpty" id="lUo%hD1:H)4+qIGwduxZ" x="113" y="213">
    <value name="VALUE">
      <shadow type="lists_create_with" id="McTQO_+6S`Iv,ZCC%$$g">
        <mutation items="3"></mutation>
        <value name="ADD0">
          <shadow type="math_number" id="7eym=to%}T8dnGV^zCix">
            <field name="NUM">1</field>
          </shadow>
        </value>
        <value name="ADD1">
          <shadow type="math_number" id="sVBui$corF3h0`9!e6jz">
            <field name="NUM">2</field>
          </shadow>
        </value>
        <value name="ADD2">
          <shadow type="math_number" id="q+gA9N/,:Xk?eo.:7R3N">
            <field name="NUM">3</field>
          </shadow>
        </value>
      </shadow>
    </value>
  </block>
</xml>
  1. Start by…
  2. Next, do…

Stack Traces

Replace with error stack trace.

None

Operating System and Browser

Additional Information

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rachel-fenichelcommented, Nov 29, 2018

Usually this means that there’s a shadow DOM on an input that we’re trying to clear out, so it just keeps respawning. The solution is usually to clear out the shadow DOM, then manipulate (add, remove, whatever) the inputs, then add back the shadow DOM.

0reactions
plh2commented, Mar 3, 2020

so what mean by ADD0, ADD1, ADD2

Ignoring non-existent input ADD0 in block lists_create_with
Read more comments on GitHub >

github_iconTop Results From Across the Web

There's something wrong with the shadow block.
Hi, When I drag the block to the workspace, the shadow block is not in the right place. Thank you. Blockly.Procedures.flyoutCategory=function(a){.
Read more >
Shadow Blocks Pt. 2: Creating and Customizing
Taking the extra minute to provide a custom shadow block can seriously aid your users, and help them quickly understand your interface.
Read more >
Extensions and Mutators | Blockly - Google Developers
Mutators. A mutator is a special type of extension that adds extra serialization (extra state that gets saved and loaded) to a block....
Read more >
Block Shadow Tool - YouTube
Add solid vector shadows to objects and text with this interactive feature that reduces the time getting a file ready for output.
Read more >
Mutators - Blockly — Google Developers - Neil Fraser
Mutators allow blocks to change in custom ways, beyond dropdown and text input ... which allows if statements to acquire extra else if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found