code-dot-org / craft

Top-down 2D game engine for the Craft app type. See NOTICE for restrictions on use.
https://code-dot-org.github.io/craft/
Other
19 stars 11 forks source link

Holding right mousebutton down while letting go of blocks activates them for run. #407

Closed v-jaarba closed 6 years ago

v-jaarba commented 6 years ago

Found in: https://levelbuilder-studio.code.org/s/craft17/stage/1/puzzle/11

Holding the right mouse button down causes a couple of issues. When letting a block go in the workspace the blocks are set to active as if they are attached to the when run block. This can cause issues if a user accidentally presses the right mouse button while moving blocks around on the workspace. Code will not run as wanted when the run button is pressed. If the block is let go in the Blocks(toolbox) section the trash can overlays the block section until it is interacted with.

A lot of the problems with the website could be fixed by not using the right mouse button click. There is no need for it in normal use and it can be used to cause issues like duplicating/deleting code that should not be touched.

Repro steps: 1) Start level 11. 2) Move blocks into workspace, before letting go press and hold down the right mouse button. 3) Observe the blocks are active. 4) Press Run button.

Expected Results: The code blocks cannot be active if they are not attached to or called by a block attached to "When run."

Actual Results: The code blocks can be activated but not attached to any other blocks leading to confusion on what code may or could do.

Video: CodeCon.zip

joshlory commented 6 years ago

Moved to https://github.com/code-dot-org/blockly/issues/67. Thank you for reporting!