Skip to content

iframe navigation affecting window history #562

@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

After navigating to micro:bit CreateAI and allowing the page to load, pressing the browser back button once appears to do nothing.

We've tracked this as far as navigations that occur in iframes also affect the parent's window.history. On load, there is a navigation inside the MakeCode iframe, presumably when we initialise a project.

The first back press is trying to undo this navigation, but fortunately, this seems to have no impact on MakeCode.

It is not clear how to fix this and it will need some thought. Manually messing with window.history can go badly. Ideally, we'd want MakeCode's initial navigation to be replaceState rather than pushState.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions