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

Dragging a collapsed function call block causes a crash if the function has inputs #3589

Closed
nederland074 opened this issue Jan 14, 2020 · 2 comments
Assignees
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@nederland074
Copy link

Describe the bug

Collapsed function call blocks cannot be dragged because of crashes. This is reproduced if the corresponding function definition block has at least one input. It works as expected if a function has no inputs, though.

To Reproduce

Steps to reproduce the behavior:

  1. Drag out a function definition block.
  2. Add an input to the block.
  3. Drag out the corresponding function call block.
  4. Collapse the function call block via Right Click -> "collapse block".
  5. Drag the function call block.

Expected behavior

Dragging should work without crashes.

Stack Traces

Uncaught TypeError: Cannot read property 'fieldRow' of undefined
    at Blockly.InsertionMarkerManager.createMarkerBlock_ (blockly_compressed.js:146)
    at new Blockly.InsertionMarkerManager (blockly_compressed.js:141)
    at new Blockly.BlockDragger (blockly_compressed.js:161)
    at Blockly.TouchGesture.Blockly.Gesture.startDraggingBlock_ (blockly_compressed.js:303)
    at Blockly.TouchGesture.Blockly.Gesture.updateIsDraggingBlock_ (blockly_compressed.js:300)
    at Blockly.TouchGesture.Blockly.Gesture.updateIsDragging_ (blockly_compressed.js:302)
    at Blockly.TouchGesture.Blockly.Gesture.updateFromEvent_ (blockly_compressed.js:297)
    at Blockly.TouchGesture.Blockly.Gesture.handleMove (blockly_compressed.js:308)
    at Blockly.TouchGesture.handleMove (blockly_compressed.js:590)
    at HTMLDocument.h (blockly_compressed.js:782)

Additional context

This issue looks similar to #2363. I tried a workaround suggested here: #2363 (comment) and it seems to work fine.

@nederland074 nederland074 added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Jan 14, 2020
@nederland074
Copy link
Author

also here's a link to a test case: https://blockly-demo.appspot.com/static/demos/code/index.html#86em5q
if you try to drag the collapsed block you can see crashes in the console

@alschmiedt alschmiedt removed the issue: triage Issues awaiting triage by a Blockly team member label Jan 14, 2020
@alschmiedt alschmiedt added this to the 2019_q4_release milestone Jan 14, 2020
@alschmiedt alschmiedt self-assigned this Jan 14, 2020
@alschmiedt
Copy link
Contributor

Thanks for reporting @nederland074! Should be fixed in #3591.

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

No branches or pull requests

2 participants