Hi jxsun,
From my understanding, code block normally would only be transcoded once attached to the event block (which is used to trigger the execution of other code block, such as “when XXX start” or “When XXX is pressed”). Therefore, for other kinds of blocks, you don’t need to have them transcoded when dragged into the script area. But in your case, the code blocks are transcoded. So I assume that you have somethings checked up in the setting page. You probably have done this:
You have the selection ''Default transcoding for scripts in combination with this block" marked up. This will automatically transcode the block without waiting for the attachment of event block, and might affect transcoding of other blocks behind it. And that’s why in your second case, the second block’s code disappear when attaching to the first block.
Therefore, I suggest you to deselect ''Default transcoding for scripts in combination with this block";
By the way, if you indeed want to create an event block in the future. Don’t forget to select 'Default transcoding for scripts in combination with this block". Besides, you need to do another thing to make sure codes of its behind blocks being successfully placed at a right position:
you need to add / *{BRANCH} * / in the “code” area as a placeholder for the upcoming transcoded code.
Best,
Allen