How can I return to my previous scroll position on a mobile theme?

Hi :slightly_smiling_face:

i have one problem with the mobile version of my theme: https://linis-candy.myshopify.com/

If i search threw the home site, click at something, for example on a product and go then back to the previous site (home site), then im not starting at the point i was before, im starting on the home site but on the top. I would like to change it, that if iam going back, that iam getting again at the position i was before, and not from the start of the page. Can somebody help me maybe?:slight_smile:

Many thanks!

Hi hast du das am Browser und auf dem handy getestet? Bei mir ist es im Browser nämlich so, wie es sein soll.

Vermutlich liegt das insofern am jeweiligen Browser. Eine Lösung könnte ein eigenes Element sein, das man in Javascript erzeugt und das die scoll-location kennt. Weisst du was ich meine?

Hi :slightly_smiling_face:

ja, im Browser funktioniert das wie es sein soll. Nur am Handy leider nicht :confused:

"Eine Lösung könnte ein eigenes Element sein, das man in Javascript erzeugt und das die scoll-location kennt. Weisst du was ich meine? " Das verstehe ich leider nicht und könnte ich auch nicht umsetzen :grinning_face_with_smiling_eyes:

Willst du mir mal ne DM oder Mail oder so schicken und wir besprechen das kurz?

Ich meine sowas zum Beispiel : https://stackoverflow.com/questions/15802134/jquery-mobile-go-back-button-scrolls-to-top

das hört sich super an, aber wo genau füge ich den code ein?

@LitExtension Hi :slightly_smiling_face:

do you know maybe, how i can handle this problem with he page back problem?

Many thanks in advance!

yes pls

Greetings! To keep the parchment position while exploring back on portable, you’ll probably have to carry out some custom JavaScript or change your subject’s code. An answer could include utilizing the ‘sessionStorage’ or ‘localStorage’ Programming interface to save the parchment position when the client taps on an item and afterward reestablish it when they return to the landing page. You might have to add this code to your subject’s JavaScript record or work with an engineer to execute it. Inform me as to whether you want more assistance!