Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

scroll-smooth problem

  • Hi,
    I use a scroll-smooth anchor-link in my navigation.
    Unfortunately the scrolling stops to high. If I click the link again it scrolls to the desired height.
    All other scroll-smooth links work kind of okay. They stop a few pixels to high on the first click and also scroll down to the desired height after a second click.

    Steps to reproduce:
    1. open the webpage (link in private information section)
    2. do not scroll (if the side is already scrolled to much down the problem does not appear/appears less)
    3. click on “Kontakt” in the navigation bar
    4. wait until the scrolling is finished
    5. click on “Kontakt” again

    I already tried using the mobile header as you suggested the last time I had issues with scrolling and links but that does not help in any way. Also the behavior is the same on desktop and on mobile. It seems to be connected with the amount the side is scrolled down before you click the link the first time. If you click the link after opening the page the scrolling stops to high but if you have already scrolled down to the anchor element and click the link any time after it stops at the correct position even if you scrolled back to the top after scrolling down.

    Thanks for your help!

  • Hi there,

    It’s likely due to the element hook being set to before_footer, it is not in the content area.

    Can you try setting the element hook to after_main_content to test?

    Let me know 🙂

  • Hi,
    that seems to help on desktop but not on mobile the behavior stays the same there. (I tried using the mobile header but that does not make a difference either.)
    Using the after_main_content hook also results in two different widths of the element on the Homepage and on /blog.
    I left it for now as after_main_content for you to check.

  • Hi there,

    that kind of thing happens if the “size” of the page changes on scroll.
    In this case that size change is happening in the smart slider plugin, on page load it has no content it just adds placeholders – see here:

    https://app.screencast.com/7grKvz0qGudtZ

    As you scroll towards the slider it loads the content, which increases the overall height of the page, resulting in the kontact sections position to shift.

    To resolve that you would need to give the slider section a Sizing > Min Height ( desktop, tablet and mobile ) that is adequate enough to stop it from resizing when the slider loads.

  • Hi,

    thanks a lot! That fixed the problem.

    For future reference:
    It is sufficient to set the loading type to “instant” in the individual slider’s settings.
    And changing the hook back to before_footer worked also.

    Thanks again!

  • Glad to hear that!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.