hotwired / turbo

The speed of a single-page web application without having to write any JavaScript
https://turbo.hotwired.dev
MIT License
6.74k stars 430 forks source link

Url is not updated when submitting a form from 1 URI to another #512

Open trsteel88 opened 2 years ago

trsteel88 commented 2 years ago

If you're on / and submit a form to /register the URL doesn't change.

The new page loads as if you were on /register (but the URL is still on /).

This means that if you don't specify a form to submit to a specific URL (e.g. the form on /register is just submitting to itself) the browser will try to submit to whatever is in the browser URL.

My scenario:

...

As a temporary fix, I have specified the action on the registration page. However, I'd imagine that the URL should be updated when a form error occurs if the path is different?

brunoprietog commented 4 months ago

Hi @trsteel88, Can you explain the problem with code? I feel that somehow this is the expected behavior, but I want to check it anyway