[Resolved] Tab layout: Disable scroll to anchor

Home Forums Support [Resolved] Tab layout: Disable scroll to anchor

Home Forums Support Tab layout: Disable scroll to anchor

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2026814
    Juste

    Hello.
    I’m putting up a tab display using anchor links.
    When I click on the link, the screen jumps to the anchor, putting the link out of view. Is it possible to avoid this jumping?
    When I test the tabs outside of GP context, like a basic codepen, there are no jumps.

    #2026830
    Juste
    #2026897
    Leo
    Staff
    Customer Support

    Hi there,

    Can you take a look at this video first and see if it helps?
    https://docs.generatepress.com/article/smooth-scroll/

    Let me know ๐Ÿ™‚

    #2028895
    Juste

    Hi. Thank you for the quick reply.
    I rated all the video. It is about smoothing the scroll.
    What I need in my tab section is actually no scroll at all. Is that possible?

    #2028934
    David
    Staff
    Customer Support

    Hi there,

    the jumplink is a browser default behaviour, and its unavoidable with the method you’re using for your tabs.
    You would need to use a javascript based method that doesn’t rely on Target IDs or has preventDefault() on the links.

    #2034607
    Juste

    oh thanks. I switched tabs method to checkboxes.
    I still need help with the page though. In the inspector, the back-to-top button is visible normally. But on my actual mobile (Huawei Mi9 with Chrome), the back-to-top button appears only at the bottom of the page and is overflown way to the right. Do you have any idea?
    Thanks.

    #2034713
    Ying
    Staff
    Customer Support

    Hi Juste,

    Can you disable all plugins except GP premium to test?

    #2035935
    Juste

    Got it. A bug with an image tranferred from google docs. All sorted now. Thanks.

    #2036207
    Ying
    Staff
    Customer Support

    No problem ๐Ÿ™‚ Glad you sorted it out!

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