Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Prevent Scroll Jump on Page Transition (different behavior in Chrome/Safari vs Firefox)

Prevent Scroll Jump on Page Transition (different behavior in Chrome/Safari vs Firefox)

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 749 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    J
    jayjay123
    wrote on last edited by
    #1

    Hi @arminunruh ,

    I’m trying to customize the page transitions on my site and I’m running into a scroll issue during AJAX navigation.

    When switching pages, LayTheme keeps the scroll position from the previous page and then scrolls back to the top. I would like each new page to start at the top immediately, without showing any visible scroll movement.

    What makes it confusing is that the behavior differs by browser:
    • Firefox: works fine – the transition uses opacity and the new page appears only after it’s already at the top
    • Chrome & Safari: the new page appears at the old scroll position first and then visibly scrolls to the top afterwards

    So users can actually see the page jumping/scrolling up, which looks off.

    Things I already tried:
    • window.scrollTo(0,0) in the Head
    • forcing .scrollTop = 0 on LayTheme containers
    • overriding window.scrollTo()
    • custom JS on page transition events

    None of these worked.
    In DevTools I can see that frontend.app.min.js calls scrollTo() after the new page loads, which seems to override everything.

    My questions:
    1. Is there a built-in LayTheme option to disable this automatic scroll behavior?
    2. Is there a recommended way to force every new page to start at scroll position 0 with AJAX transitions?
    3. Why does Firefox behave differently from Chrome/Safari here?

    Thanks a lot for your help!

    1 Reply Last reply
    0
    • arminunruhA
      arminunruhA
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      hey! do you have a link?
      i will fix it! i would just need to take a look at your site to see why it happens <3

      1 Reply Last reply
      0
      • J
        J
        jayjay123
        wrote on last edited by
        #3

        https://energiebuero-hetschko.de/leistungen/
        PW is: test

        1 Reply Last reply
        0
        • arminunruhA
          arminunruhA
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          Screenshot 2026-02-04 at 10.31.58.png
          i think its because of this.

          if you remove this css, it will work without adding any extra code.
          this css should be in: lay options -> custom css & html

          if you want smooth scrolling you can enable smooth scroll in lay options!

          Screenshot 2026-02-04 at 10.33.36.png

          1 Reply Last reply
          0
          • J
            J
            jayjay123
            wrote on last edited by
            #5

            ah perfekt! Thanks so much!! Worked! <3

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            Online Users
            J
            j.varela
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search