Turbo: issue with scroll position after restoration visit

Hello everyone!
Thank you for such a wonderful framework :pray:

According to the Turbo Drive doc:

Turbo Drive saves the scroll position of each page before navigating away and automatically returns to this saved position on restoration visits.

But with the latest version (turbo@^7.0.0-beta.4) it always scrolls to the top when I hit the back button.
Am I doing something wrong or is this the expected behavior?

FYI I’m not using frames or streams, just regular links that are intercepted by Turbo Drive.
If I remove Turbo then the scroll position works as usual when I hit the back button.



I have the same problem and opened an issue here: Browser back & forward button loses scroll position · Issue #171 · hotwired/turbo · GitHub

Does this match what you’re seeing?


Yes, your demo fits exactly with my experience.
It works fine with Firefox 85 and Chrome 88 (on macOS Catalina) but it scrolls to the top with Safari 14.

Glad you opened an issue :+1: