# "List" variable persists when covered with another block

**URL:** https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747
**Category:** Help
**Created:** [March 18, 2026, 9:30pm UTC](https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747 "2026-03-18T21:30:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jboutel](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jboutel](https://forum.makecode.com/u/jboutel)
#### Post date: [March 18, 2026, 9:30pm UTC](https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747/1 "2026-03-18T21:30:32Z")

</div>

In previous versions of Makecode Arcade, when a user dragged out the “For element value of list” block, if you placed another block on top of “list” the list variable would disappear. For example, you could replace it with “Array of all (blank tile) locations.”

Currently, if you do this the “list” variable will show up on top again. Users can take the list variable and throw it in the trash and this will fix the problem, but this is a confusing extra step since other variables don’t work that way. My students tend to get hung up on this if I am not around to tell them how to fix it.

Screenshots  
Current behavior:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/a/2a872b069c9000a3f4095509f52276be490128d7.png)

Expected behavior:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/3/238c9f78b81eb81f97dd8902ad6713d757c12c29.png)

---

<div class="post-metadata">

### Author: ![BLADEr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blader/32/16422_2.png) [@BLADEr](https://forum.makecode.com/u/BLADEr)
#### Post date: [March 18, 2026, 11:40pm UTC](https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747/2 "2026-03-18T23:40:42Z")

</div>

I think that’s just an assumption the computer makes. The same thing happens when you put the “absolute value” block on a variable. Because there was a variable under it and there’s only one spot where that variable could’ve gone (the tile slot), it was put there; kind of like autocorrect.

I’m not sure there’s a way to turn it off.

Hope this was helpful!

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 18, 2026, 11:40pm UTC](https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747/3 "2026-03-18T23:40:45Z")

</div>

This is what I also expected, because I was so confused whenever it did that.

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [March 19, 2026, 12:35am UTC](https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747/4 "2026-03-19T00:35:50Z")

</div>

this behavior has always annoyed me, but i’ve never “fixed” it because it’s actually intentional on the part of the blocks library we use (Blockly). still, so many people have reported this to me over the years that i’ve finally opened a PR to patch it out:

> <https://github.com/microsoft/pxt/pull/11201>
>
> fixes https://github.com/microsoft/pxt-arcade/issues/7370
> 
> also mentioned on t…he forum here: https://forum.makecode.com/t/list-variable-persists-when-covered-with-another-block/42747
> 
> not that i actually needed this to be reported, because it annoys me ALL THE TIME, but i never fixed it because this isn't actually a bug but rather an intentional blockly feature.
> 
> when a block is dragged into an input that already has a non-shadow block connected, blockly has some logic that checks to see if the block you just dragged has a single input and, if so, connects the previously connected block to the input of the block you just dragged. presumably this is to make it easier to wrap blocks with a new block (for example, dragging an absolute value block onto a number in an equation will wrap it theoretically saving you an extra drag). however, nobody ever expects this behavior and only the most powerful of power users would use it to their advantage. it also can cause type errors when the displaced block is a variable since variables can be connected to any input regardless of what type they actually hold. it's better to just disable it entirely.
> 
> \*\*behavior before:\*\*
> !\[orphan\_block\_before\](https://github.com/user-attachments/assets/c97a131c-a732-40ce-8b7e-86906226df45)
> 
> \*\*behavior after:\*\*
> !\[orphan\_block\_after\](https://github.com/user-attachments/assets/7231f899-ee8b-46a2-9ea4-ee80ed440990)
> 
> 
> unfortunately, there's no graceful way to disable this so i had to monkey patch
> 
> if you want to look at the original code that's being patched, it's \[here\](https://github.com/RaspberryPiFoundation/blockly/blob/1c280d10cc1dcad7d50a1678211871058d4e9cfb/core/connection.ts#L721)

see that PR for a more in depth explanation of why this exists in the first place, but i’ll try to push this out in a hotfix sometime soon (assuming i didn’t break something else with this change)
