Support » Plugin: All-in-One Event Calendar » Back button takes me to the footer of the page

  • Resolved laura_b



    So this is not a big problem, but still something that’s not optimal.

    If I go to the Events page (, click on an event and then on the ‘Read more’ button to go to the single event page, and then click back (just the back button of the browser), I land back on the bottom of the event page – meaning I only see the footer and need to scroll up in order to see the list of events.

    Is there anything I can do in order to land on the top of the page?

    Hope this is clear enough..


    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Benjamin


    Hi Laura,

    I checked your calendar and everything is fine on my side, I can not see the issue, which browser do you use?


    Thread Starter laura_b


    Hi Ben,

    I use Chrome and.. yes, that happens to me as well. Sometimes it works fine, and sometimes not (when doing the exact same steps).

    On Safari it always works okay.

    Thanks for looking into this,

    This happens because the browser remembers the location it was when it left the page.

    So if you click an event, you will scroll down about (for example) 400 pixels because of the event info that is shown.

    If you click READ MORE, then return to the previous page, it will remember being 400 pixels down, except the Event info is not shown. Hence it puts you down to the footer.

    To fix this you can add the following code to the event page

    window.onload = function(){
      window.scrollTo(0, 0);

    This will have no impact when you visit the page regularly, but it will when you return to the page. In that case it will scroll up again.

    You can use this plugin to create a shortcode for the code.

    This will also allow you to add the code to other pages where it might occur.

    Thread Starter laura_b


    Hi studiostekker,

    thanks a lot for your reply! You’re right, I never really noticed that the place you scrolled down to is kept when navigating back.

    I’m sorry, but your indication is beyond my level of technical skill. Where exactly on the event page should I add that code?

    Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Back button takes me to the footer of the page’ is closed to new replies.