Blocs 3 - smooth scroll to target

I’m trying to smooth scroll to an anchor point in the page. Right now I am using “navigate to URL” to jump to the bloc ID - and it jumps well. Since the scrollToTop is smooth, I’m wondering if there is a way to smooth scroll to the anchor, and not just jump.

If there’s not a native way I’m sure I can add some jquery - but want to know if it can be done in v3.

thanks

Steve

UPDATE: I see I can add attributes, but I can select the link to be able to add the onclick attribute. Not sure if that’s by design or a bug.

Hello @steveshead, in Blocs 3 you should use “Scroll to target”, there you can adjust the Speed.

05

2 Likes

Thanks @webplus - odd thing - the “Interactions” panel doesn’t show up with “Navigation”. I see it on the logo, but not the nav. I might be doing something wrong though. I added the nav block in the usual place. Anything you can think of that I might have missed?

UPDATE: I created a new navbar from the bric library and the interactions panel shows up. If I add a navigation bloc the interactions panel does not show up, and you can’t click on a “link” in the left hand panel nav container - it jumps back up to the container if you do - said another way, you can’t highlight a link, the cursor won’t stay on the link itself and moves back up to the container. Might be a bug.

Steve

Hello @steveshead do you mean a hero Bloc? If yes, for me it is working. Restart your mac once, and try it with a new project. If it still happens, you should open a bug report.

https://help.blocsapp.com/knowledge-base/reporting-bugs/

Rebooted and started a new project, added a hero bloc with nav, and it did the same thing. Expand the bloc tree down through “List”, “List item” - click on link and it jumps back up to “List” - quite odd. I’ll report as a bug.

The workaround was to remove the nav from the hero, and add one from the brics menu - that worked as advertised.

Steve

UPDATE: I reported the bug but I’m not sure if it went through - didn’t get a confirmation screen or email - yet.

hi Webplus, would like to scroll smooth to an anchor, only with ‘Navigate to URL’ will let me handle the job. How come you can use Scroll to Target instad of N-to-URL and set the smoothing time?
Or was the #abc just an example?

grtz, Andries

I will answer you 1.5 years later on behalf of @webplus

He obviously used a Bloc ID, since your Anchor IDs won’t display in that right sidebar popup menu. For example, if you select text, make it a Span, then add an ID – that’s basically an Anchor you added. Those Anchor IDs really need to be displayed in that popup so we can smooth scroll to them!