Some forms in my app take up a full page and any errors are returned as flash messages at the top of the page.
With turbolinks, submitting a form with errors results in the form re-rendering, with the user being taken back to the top of the page. However, with turbo, responding with a 422 doesn’t change the scroll position. Users will be left at the bottom of the page, perhaps not realising that the form has submitted and that there are errors they need to address.
Is there a way I can ensure the user is sent to the top of the page after a form re-renders with status 422?
Thank you!