I’m creating an Asp.net application in combination with Turbo/Stimulus.
The application shows images with a button. That button does a post to a form.
I return a 303 http code in the backend with the original url (referer).
That button work fine and the scroll position remains the same, but after that form submit my gallery functionality is broken. (lightgallery)
If I add a fake query param after the original url when returning 303, then there is a reload and the pages scrolls to the top. After that the gallery keeps working.
Can someone explain to me why this happens?
I would like a combination of both. The scroll position should remain, but the refresh should behave normal