Open cdsmith opened 8 years ago
Actually, this seems to be an issue for top-level blocks, as well. Just clicking them once adds an enabled version to the workspace.
I'm also not sure exactly why this happens. For some reason the drag flag is still set when the block is placed. This seems to be the case when the block is spawned, but not yet moved. I'm adding this as a note to come back later to.
IIRC, this orphan-disabling thing is a core blockly feature. When you figure this out, you might consider contributing the fix upstream, as well.
Create a function with one parameter. If you just click once on the parameter name, this is interpreted as grabbing the block and dropping it immediately. There seems to be a race condition or some other weird behavior here: sometimes the dropped block is disabled, but other times, it's not - leading to a top-level "x" expression in the program. Dragging that block anywhere does cause it to become disabled.