ux icon indicating copy to clipboard operation
ux copied to clipboard

Turbo restoration visit displays wrong AJAX

Open DavidPetrasek opened this issue 1 year ago • 5 comments

When visiting a specific page by clicking a link and then going back to previous page everything is fine. However, when this is repeated, after going back to previous page the icon on "Symfony Web Debug Toolbar" which represents AJAX request is flashing and shows:


1	[7e31b1]  GET	fetch	200	https://some.site/login	76 ms
2	n/a       GET	fetch	n/a	https://some.site/login	n/a

Which means it is either performing or showing the wrong AJAX call.

Used versions: Symfony 7.0.3 symfony/ux-turbo v2.14.0 NPM: ├── @hotwired/[email protected] ├── @symfony/[email protected] -> ./vendor/symfony/ux-turbo/assets

DavidPetrasek avatar Mar 05 '24 08:03 DavidPetrasek

It's possible some ajax call is being cancelled... or perhaps the web debug toolbar is getting confused by this. You could look to see what Ajax calls are really happening and when to see if the web debug toolbar is reporting accurately...

weaverryan avatar Mar 05 '24 17:03 weaverryan

After checking the real network activity in Firefox's dev tools, it's evident that there is no additional AJAX call triggered when going back in history for the second time. Therefore, the web debug toolbar must be confused in some way.

DavidPetrasek avatar Mar 05 '24 18:03 DavidPetrasek