Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializing a stack of blocks only outputs the first block #2096

Closed
RoboErikG opened this issue Oct 30, 2018 · 5 comments
Closed

Serializing a stack of blocks only outputs the first block #2096

RoboErikG opened this issue Oct 30, 2018 · 5 comments
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong type: regression

Comments

@RoboErikG
Copy link
Contributor

Problem statement

Dragging a stack of blocks out of the Toolbox only copies the top block in the stack.

Expected Behavior

The entire stack should be dragged out.

Actual Behavior

Only the first block in the stack is dragged out.

Steps to Reproduce

  1. Open the local copy of tests/playground.html on develop branch
  2. Switch to test blocks
  3. Try to drag out the stack in the drag category

Stack Traces

Replace with error stack trace.

Operating System and Browser

Desktop Chrome

Additional Information

@RoboErikG RoboErikG changed the title Dragging block stacks out of Toolbox is broken Serializing a stack of blocks only outputs the first block Oct 30, 2018
@RoboErikG
Copy link
Contributor Author

The simplest repro case is actually to stack two blocks in the playground and click export to xml. Only one block will be exported.

@RoboErikG
Copy link
Contributor Author

Looks like #2080 broke it by changing the node type for next blocks. @NeilFraser

RoboErikG added a commit to RoboErikG/blockly that referenced this issue Oct 30, 2018
Fixes google#2096

We were creating a text node to wrap any block connected to
next when we should have just been attaching the generated dom.
RoboErikG added a commit that referenced this issue Oct 31, 2018
Fixes #2096

We were creating a text node to wrap any block connected to
next when we should have just been attaching the generated dom.
@NeilFraser
Copy link
Member

Sorry.
Good fix.

@VoxelPerfect
Copy link

VoxelPerfect commented Nov 4, 2018

Please run a Rebuild so that the fix is included in the compressed files and create a new tag.
I had to override Blockly.Xml.blockToDom with that in your latest commit to make it work with 1.20181030.0

@rachel-fenichel
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong type: regression
Projects
None yet
Development

No branches or pull requests

4 participants