Skip to content

real time code generation incorrect while dragging? #2646

@gengshenghong

Description

@gengshenghong

Problem statement

It can reproduce with the online demo at: https://developers.google.com/blockly/
While dragging a block from toolbox, the real time generation of code is incorrect.

Expected Behavior

N/A

Actual Behavior

屏幕快照 2019-07-16 下午6 52 53

Steps to Reproduce

  1. open 'https://developers.google.com/blockly/'
  2. use the "Try Blockly"
  3. switch "Language" to "Python" (also fail with other language in fact...).
  4. drag "if do" block in "logic"
  5. while dragging, the generated code is as below:
if False:
  pass

if False:
 pass

which is incorrect and confusing to user.
6. stop dragging and put the block in workspace, the generated code is as below:

if False:
  pass

which is correct.

Stack Traces

N/A

Operating System and Browser

Mac OSX, Chrome

Additional Information

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions