[Resolved] Anchors in Hero Image Buttons

  • Author
    Posts
  • #5292

    ben_demotic
    Participant

    Hi Andrew

    I had a look at the modifications you made to Ultra to allow smooth scroll on one page sites from the menu bar. I have this setup and working in my development environment.

    However, I have one slide in a Hero image with a button which I wanted to “smooth scroll” to an anchor so I set it up to call the same anchor as a test menu item. But when you click the button in the Hero image it jumps straight to the relevant section (but with the top of the section at the top of the page and not just below the menu bar) and places a wierd blue selection rectangle around the content (at least it does in Chrome).

    Would you mind taking a look and advising if this is supported or not?

    Thanks

    Ben

    #5293

    ben_demotic
    Participant
    This reply has been marked as private.
    #5296

    Andrew Misplon
    Keymaster

    Hi Ben

    Thanks for reaching out.

    At the moment the smooth scroll functions are specifically looking at the main menu for anchors to scroll to. The functions aren’t looking at anchors outside of the menu. What you see when clicking the Hero button is just the normal Chrome page jump without smooth scroll, without menu offset and with div focus highlighting.

    I’ll do my best to try and accommodate this request in Monday’s update but can’t promise it’ll be included. I’ll keep you updated.

    #5302

    ben_demotic
    Participant

    Hi Andrew

    Appreciate your answer – I thought this would be the case.

    If it makes it to the next update, all good, but if not I will find a work around (or leave it as it is).

    Thanks

    Ben

    #5317

    Andrew Misplon
    Keymaster

    Thanks 🙂 I have a solution for this but it needs to be done with a class.

    <a href="http://url.com" class="puro-scroll">Link text</a>

    At the moment, the Button widget base that is used in the Hero widget and in the Button widget itself only offers an ID field in the Other attributes and SEO section. I’ve logged the request with SiteOrigin, hopefully, we’ll see a class field added to the Button widget base (used in the Hero) very soon. I’ll keep you updated with further developments.

    #5324

    Andrew Misplon
    Keymaster

    Ok cool, here is the addition for the Widgets Bundle: https://github.com/siteorigin/so-widgets-bundle/issues/339#event-827808842.

    Ultra update should go out on Monday with my fix. I can’t say exactly when the Widgets Bundle update will go out, as soon as it does, the class field will be there in the button section of the Hero. I’ll add this all to documentation when it’s released.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Scroll to top