Oxygen builder integration #892
Replies: 2 comments 4 replies
-
On first glance, it looks like you're initialising swup twice. <script src="https://unpkg.com/swup@4"></script>
<script>
const swup = new Swup();
</script>
<script src="https://unpkg.com/@swup/scripts-plugin@2"></script>
<script>
const swup = new Swup({
plugins: [new SwupScriptsPlugin()]
});
</script> |
Beta Was this translation helpful? Give feedback.
-
Thank you. I've cleaned that up and trying to test it, however, because I pulled out every but of JS I was using for a few things, I'm back to my problem of the expanded mobile menu not closing when a link inside is clicked. It remains open. The class for the expanded state is .oxy-nav-menu.oxy-nav-menu-open, and the closed state it needs to return to upon click is .oxy-nav-menu.oxy-nav-menu-closed. Pages are reloading behind the menu because I can see the url change. But the menu remains visible. Is this something that Swup needs to trigger the closure of? I previously had some custom JS in there that was working, but trying to keep things as clean as possible and in the confines of what Swup should do to handle page transitions. Update: I added in some code to close the menu when viewport is below 992px in width. Swup seems to be installed correctly and the page transitions are happening, but it is still doing the thing where it sometimes only loads a partial page, and the page can't be scrolled. Thanks again, I really appreciate your help. |
Beta Was this translation helpful? Give feedback.
-
Describe your problem 🧐
I have Swup running in Oxygen Builder in Wordpress. It's working great, save for one problem: on mobile, sometimes clicking a navigation link to a new page results in a page that can't be scrolled (content is cut off at the bottom), and, sometimes the styles don't fully load for the homepage. It's random, and I can't figure out why. Sometimes the Projects page is affected by this, sometimes the Information page, and sometimes the Get In Touch page.
What is your question? 🙋♀️
How can I troubleshoot, and resolve this issue? Is there an additional feature I need to enable to ensure that new pages load 100% and all stylesheets that affect the page fully load? Am I even looking at this problem the right way, or is there something I'm missing? To reproduce, the browser inspector and mobile view is encountering the same problem as a mobile device. The homepage not fully loading occurs on desktop and on mobile, but it's random. I can't quite figure out why it happens sometimes and not others.
Also worth noting: all of these issues resolve with a browser refresh. They do reoccur, but when they're happening, a browser refresh clears it up temporarily.
URL to minimal reproduction 🔗
https://mguxd.com/home-2024
Checked all these? 📚
Beta Was this translation helpful? Give feedback.
All reactions