How to Persist Scroll Position with Hotwire Turbo

Posted on

I hate it when I click a link in a sidebar, then you loose your place. With Hotwire Turbo you can pretty easily persist the scroll position of an element between page loads.

In this tutorial I show you how to look into the Hotwire Turbo event cycle to persist scroll positions of elements on your page.

Sources