barba: Popstate events doesn't call hooks when url have query string

The problem

when using back / forward while the url have a query string, barba doesnt fire any events, therefor we cant get the https://barba.js.org/docs/advanced/hooks/#data-properties data.trigger to manually force reload the page.

Steps to reproduce issue [ Good To Have ]

  • setup barba hooks before, after and log their data
  • create 3 links 2 with a query string & 1 without
  • click the normal link first
  • then click the 2 qs links
  • now press the back btn and check ur console
  • url will change but the hook events wont fire, only when u get to the normal url, something will be logged.

Environment

  • Barba version that exhibits the issue: "@barba/core": "^2.9.7",
  • Build used:
    • module (esm/)
    • browser (dist/)
    • main (lib/)
  • Browser OS/version used: OSX 10.14.6 / Chrome 83.0.4103.97

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 18 (9 by maintainers)

Most upvoted comments

no difference unfortunately, when pressing back the url gets changed but no network call is made.

i believe barba doesnt currently have a solution for that, still many thanks for you help.

@ctf0 thanks for the repo, I will give a feedback as soon as possible! 😉

here is the repo https://github.com/ctf0/barba-demo

  • run composer install
  • run php artisan serve
  • test in browser

thanx for ur help so far, am using barba with laravel but anyway will creat a repo and post it today.

thanx again.