-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
New content appended to wrapper rather than replacing container #479
Comments
Note this still occurs if I remove the conditionals checking if $_SERVER['HTTP_X_BARBA'] is set. |
I've created a minimum example and uploaded to GitHub and published it with GitHub pages. Hopefully this will help – I feel like I must be doing something wrong but for the minimum example I've copied code straight from the legacy page on the site and am still seeing the same problem. Repository: https://github.com/johnpuddephatt/barba-test This demo loads Barba core and css from unpkg. It runs barba with:
The problem is as before: page content ends up beneath the footer. |
Same here. For now I moved the footer inside the container but would love to avoid the get-around. However thank you very much for barba.js, it is fun to use! |
I'm having the same issue,
After the first click, the dom changes and appends a second container with the second page.
The thing is that after the second click, the second container would be updated as expected instead of adding a third container. I think that i should get rid of the extra container with JS, but im not sure and I also i cant find any simple hideshow example for barba v2 as it was on v1 thanks |
I recently discussed about this issue with @thierrymichel, and it should work the same way as @barba/core works. So it will be fixed in a future release, be patient 😉 |
I also have this issue. It seems the container is appended as the last child of the wrapper. Even though that is not the correct location for it. I have my wrapper set to my Thanks |
Hi @crgeary, There is no implications, if you want to put the Barba wrapper inside the body tag on a specific div its possible. Hope it's clear 😉 |
I'm also having this issue, I'm working on a WordPress setup and the barbaCss breaks the functionality : -When I put the data-barba="container" in the 'main' element, the transition gets stuck to the 'leave-active' state -When I put the data-barba="container" in a div inside the 'main' element, the container with the new page data gets added to the end of the data-barba="wrapper" container and never replaces the targeted element, so it stays on the bottom of the page (after the footer which does not get affected) |
The problem
I had barba/core working as expected. Then I installed barba/css and ran into problems with fetched content being appended to my barba wrapper rather than replacing my barba container as I expected.
Description
My markup looks like this:
When I navigate to a new page without barba/css it works as expected. When using barba/css, however, my new content appears where I've indicated in the markup. The previous page content is removed however, I do not see duplicate content.
The javascript calling Barba is very simple. I was originally running Barba with
barba.init();
. To use the CSS module I changed this to:BarbaCSS is installed and I've verified this to be working by adding some simple opacity transitions between pages. I don't see any console messages.
Environment
The text was updated successfully, but these errors were encountered: