We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a3e20a commit 2c49c65Copy full SHA for 2c49c65
template/src/layouts/Layout.astro
@@ -44,8 +44,8 @@ const { title } = Astro.props;
44
}
45
46
// only swap the main area of the page so we keep the webcontainer iframe intact
47
- const newMain = newDocument.querySelector('main');
48
- const oldMain = document.querySelector('main');
+ const newMain = newDocument.querySelector('main[data-swap-root]');
+ const oldMain = document.querySelector('main[data-swap-root]');
49
50
if (newMain && oldMain) {
51
builtInSwap.swapBodyElement(newMain, oldMain);
0 commit comments