vtex-apps / store-discussion

VTEX IO store builders' community
80 stars 5 forks source link

Scroll Restoration not working #700

Open pedrobernardina opened 1 year ago

pedrobernardina commented 1 year ago

Scroll Restoration is feature that restores scroll position when the user navigates back to a page. It's especially important on PLP, so when users visits a product page, they don't need to scroll back to where they were when they return.

In the first video we can see the expected behaviour — the user scrolls on the PLP, clicks on a product and, when she clicks on the back button, returns to where she previously was on the PLP. We’ve tested it on Shein store (not VTEX IO) for illustration purposes.

In the second video we can see how it is today on our store. This seems to be a problem with VTEX IO, since this feature does not work in any of the stores we’ve tested (including the default theme).

https://user-images.githubusercontent.com/15324745/227289332-10ceb467-89a5-4d03-be24-4c3280f0d6e2.mp4

https://user-images.githubusercontent.com/15324745/227289391-2c817ca9-0ca9-4319-b334-1f40a7b4198a.mp4