Check this out: https://inertiajs.com/scroll-management
Inertia.post('/users', data, {
preserveScroll: (page) => Object.keys(page.props.errors).length,
})
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've just noticed on my project that when submitting forms using Inertia.post() my pages jump to the top.
I didn't realise at first as my registration form is at the top of my page, but I have another form further down and when submitted no matter if there are errors or it was successful the page starts at the top. As far as I'm aware the page isn't reloading, is it normal for this to happen?
My controller returns look something like this return Inertia('Home')
Check this out: https://inertiajs.com/scroll-management
Inertia.post('/users', data, {
preserveScroll: (page) => Object.keys(page.props.errors).length,
})
Please or to participate in this conversation.