Skip to content

Can no longer visit positions in a block after a nested statement block #9139

@microbit-robert

Description

@microbit-robert

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

If you have an if/if else block and add a statement block inside one of the if... conditions, you can no longer visit any node in the parent if block after that statement block. In MakeCode, this also impacts access to the +/- modifiers to add / remove conditions. First noticed by @microbit-grace

I think this behaviour change was unintentionally introduced in #9104

Reproduction steps

Please see video below for reproduction.

Stack trace

Screenshots

Screen.Recording.2025-06-02.at.11.08.19.mov

Browsers

No response

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions