简体   繁体   中英

Html page not loading after barba js transition

I have this issue where when i click a link to go to another page, the barba transitions runs flawlessly, but it stays in the same html page and i have to refresh the page in order for the other page to load

I tried setting a window.open after the transition run to temporarely fix it, but i have no idea what might be going on

Here is the code: https://github.com/david1opez/Mentes-Brillantes/issues/5

After hours of breaking my head i found out that the error was in the html page

 barba.init({ sync: true, transitions: [{ async leave(data) { const done = this.async(); pageTransition(); await delay(1500); }, async enter(data) {} }] });

I forgot to put done(); after await delay(1500)

So now this is the working code

 barba.init({ sync: true, transitions: [{ async leave(data) { const done = this.async(); pageTransition(); await delay(1500); done(); }, async enter(data) {} }] });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM