-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pages are rendered outside the layout when page transitions are enabled #24632
Comments
|
When wrapping a <template>
<div>
<AppNavbar />
<div>
<slot />
</div>
<AppFooter />
</div>
</template> |
Hey 👋 https://nuxt.com/docs/guide/directory-structure/layouts layouts must have a single root element |
This is indeed an oversight. I forgot that I had removed the |
After checking the original project, the layout-wrapping div was indeed present, it was an oversight in the reproduction.
Wrapping |
@e-tho If you can pin-point which nuxt version introduce it, that'd help 👍 |
@e-tho I've got the exact same issue since running yarn install again this morning, this worked fine before. |
Nuxt layouts should only have one root element with transitions, there should be a console warning about that, do you have it ? |
@huang-julien But even with a wrapping div around everything, it is not enough. A div around the |
Indeed sorry ! 👀 i'll take a look, seems like something is happening with vnodes. Edit: Can't reproduce it locally on the nuxt repo O_o ... |
@huang-julien Strange, for me it also work with the nightly build in the StackBlitz 🤔 |
This also started happening to us after 3.8.2 update, I believe. Disabling transitions (or using
Every page does have a single node. |
Nuxt version where issue show up:
Issue resolved when is used Setting in app: {
layoutTransition: {
name: "page",
mode: "out-in",
},
pageTransition: {
name: "page",
mode: "out-in",
},
} |
I got this error in nuxt 3.7.3. |
Hello, I encountered this bug for the first time today after upgrading to 3.9. Now my page content is placed after my footer, completely ignoring the Wrapping the |
This behavior has been introduced in Vue 3.3.10, probably related to vuejs/core#9309 |
Let's track in vuejs/core#9996 |
@manniL I just happened to run into this issue in Nuxt 3.9.1. It looks as if the Vue 3.4.6 update fixed the original attached Stackblitz example, but I ran into more issues with reordering on my project. I discovered that if you change to a page using a different layout structure, then transition back, the reordering layout bug comes back. Here is an example updated Stackblitz using the latest Nuxt 3.9.1 and Vue 3.4.6: I introduced a new layout called "blank" and a third page using the blank layout. Navigating between home page and second page do not break no matter how many times you toggle between the two until you navigate to "third page" with the different layout. Steps to reproduce:
Unfortunately it looks like this causes the original reordering bug to come back just as before vuejs/core#9996 was marked fixed with vuejs/core@a3fbf21 Thanks for all the help getting to the bottom of this bug! Let me know if there are any other details I can provide to help. |
@volkipp Thanks for reporting |
Environment
Reproduction
https://stackblitz.com/edit/github-tf41bf?file=layouts%2Fdefault.vue
Describe the bug
This behavior appeared recently, when navigating from one page to another with page transitions enabled and a layout such as:
NuxtPage
is rendered afterAppFooter
in the DOM.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: