Missing context-menu items: "Duplicate" and "Delete Block(s)"

In one of my son’s games, when we right click on a block the context-menu is missing the “Duplicate” and “Delete Block(s)” options. Reloading the page does not fix it.

Opening another of his games (same machine, same time), those options are not missing.

Any idea what might be causing this, or how to fix it?

thanks

Can you send the game link? It is possible that it is a game-related problem. If not it might be due to a bug with the editor.

Hi, here it is https://arcade.makecode.com/58704-94152-35417-79677

Thanks for offering to take a look!

tom

Hm yeah something super weird is happening here, need to investigate. I switched it to javascript and back (after a spacing change to force it to recompile) and all the options came back (can see here: https://makecode.com/_3rsP6o8gHiAY – code is laid out differently but all should be there / right click options work again) – what’s slightly weirder is that in the link you sent for some reason we appear to only be counting 49 blocks:

where there are actually > 1200 in the project.

1 Like

Ahah I figured it out, this occurs when you close the tab of a project while in debug mode then open the project again – we exit debug mode but the project is saved with blocks set as deletable="false"

I’ll file a bug for this in our issue tracker, thankyou @tomsaffell for reporting this issue!

edit: issue filed here: https://github.com/microsoft/pxt-arcade/issues/4906

3 Likes

@jwunderl awesome, thanks for figuring that out, I’ll give the ‘force recompile’ trick a try.

I’ll tell my son he found a bug in the system - he’ll be super proud.

That said, I’ve told him a few times, “when something wont work, it’s natural to start wondering whether there is a bug in the environment/compiler/API, etc, but 99% of the bug is in your code, so look there”.

This experience isnt going to help re-enforce that idea ! :slight_smile:

Thanks again

3 Likes