code-dot-org/blockly — pull request #551 by Bjvanminnen (2014-05-06 18:44:21+00:00)
Title: Disable toolbox while maze/turtle are running

Originally I made it so that we disabled the toolbox only while stepping, and until the reset button is clicked.

This change makes it so that for all artist/maze levels, the toolbox is disabled while the program is running, and gets reenabled after it finishes (before you've hit reset). Disabled means that you can't drag blocks out, or if in category mode, you can't even select a category.

I didn't think it made sense to do this for bounce/flappy/studio, since I think it's fairly common to edit the workspace while your program is running.

Part of the motivation was just that this makes sense, part of it is that there seemed to be a variety of bugs in this space. For example, if you drag a block from the toolbox to the trashcan while your program is running, sometimes it will delete blocks from your program instead of the one you just dragged from the recycle. We were also hitting two different JS errors in similar scenarios.