Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

77
Views
Why scroll position doesn't save on IOS when go back to the previous page?

I have a page with a lot of content, and when I scroll down the page and then go to another page and then go to the previous page it scrolls up. But it doesn't work only in Safari and IOS. Chrome and Android work correct and the scroll position of the previous page saves.

The code with redirect to the page when I click on some item:

            goToProduct: function (event, product) {

            if(this.refreshPage){
                return
            }

            event.preventDefault();

            if(this.$root.currentView !== 'product'){
                userHistory.saveScrollPosition();
            }

            window.location.href = product.url;
        }


    saveScrollPosition() {
    if (!history.state) {
        return;
    }
    history.state.scrollPosition = window.scrollY ? window.scrollY : $('html, body').scrollTop();
    history.replaceState(history.state, null, history.state.url);
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!