-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
advanced
and restore
visits keep current scroll position with scroll: :preserve
#1081
Comments
some use case sample: or this should be tweaked with a custom per-page |
scroll=preserve
scroll=preserve
The new configuration should only affect page refreshes, not restoration visits, so I think it could be considered a regression |
probably, there is an edge case and this breaks only when you navigate from a scrollable page to a page that fits the screen and then back to scrollable, that's when the scrollToTop happens on restore visit. but it works just fine when you move back and forth between pages that are both bigger than 100vh. but another silly thing, when moving between scrollable pages and a next page gets loaded and scrolled straight to position you were going away from on a previous page. |
scroll: :preserve
The initial bug report was actually related to the autofocus effect and not relevant anymore. The actual bug covers scroll.reset.movscroll.preserve.mov |
scroll: :preserve
advanced
and restore
visits keep current scroll position with scroll: :preserve
@maxnovee thanks for the report. I think this is a bug indeed: the |
See hotwired/turbo#1096 and hotwired/turbo#1081 for reference.
a restoration visit with back button no longer scrolls back to saved position when
scroll: :preserve
not sure if that's now a bug or a feature, but breaks a previous nice user experience on mobile views with advanced links and left slides.
The text was updated successfully, but these errors were encountered: