Commit 36e26f8
Fix iframe reloadEditor no-op once fragment is on the URL (#11184)
This only applies in the iframe / no-cookie case as otherwise reload was
already called.
After one reloadEditor adds #editor, navigating to the same URL via
location.assign(location.toString) doesn't actually reload as it's counted as a
fragment navigation only. So it worked the first time only (e.g. when toggling
keyboard controls you can only toggle once).
This isn't an issue for micro:bit apps embedding MakeCode as they're same-site
and go down the path that already reloaded, but confused me a lot when testing
the iframe embedding in a non-same-site context.
Co-authored-by: Richard Knoll <riknoll@users.noreply.github.com>1 parent d93b4e7 commit 36e26f8
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2981 | 2981 | | |
2982 | 2982 | | |
2983 | 2983 | | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
2984 | 2987 | | |
2985 | | - | |
2986 | | - | |
2987 | | - | |
| 2988 | + | |
2988 | 2989 | | |
2989 | 2990 | | |
2990 | 2991 | | |
| |||
0 commit comments