Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jellix's avatar

Calendar shouldn‘t scroll to top

I‘m using a FullCalendar (but with react-big-calendar it‘s the same): After saving an event via router.visit the calendar „scrolls“ to top although I tell the router to preserveScroll and preserveState. It seems legit: the Controller-function returns back to the view, the view renders from the beginning, so does the Calendar. The preserveScroll works for the view but not for the calendar-component.

Does anybody habe a hint to that?

Greetings!

0 likes
1 reply
Max100's avatar

Fwiw, with fullcalendar I had better results using axios.post rather than submitting a post from inertia. And then also you don't need preserveScroll or preserveState. On the server side, there's no need to return anything after storing or updating an event. Just do the db stuff in php and then end the function. A response is returned to the axios call.

I'm using the fullcalendar vue component, but the same should apply to plain js fullcalendar.

Please or to participate in this conversation.