NO BUG: Bricks / anchor link scrolling behaving inconsistently

Hi guys,

I’m having an issue with anchor link scrolling behaving inconsistently:
https://narrentreffen-stockach.de/

This page uses two menus:

  • A primary menu, revealed via the hamburger button

  • An on-page menu, located in the hero section (the page acts as a digital program brochure)

When clicking on a link on the on-page-menu that leads to an anchor on the same page (FAQ, Partner, Programm) everything works fine.

When clicking on an onpage anchor link from the primary menu, the page scrolls far past the linked section.

Both menus are populated from the same WordPress menu.

I can’t identify a pattern so far and have no idea what causes this behavior.

Stack:

  • Bricks version: 2.1.4 (latest)

  • Core Framework (latest)

  • WP Fastest Cache (disabled that but it didnt help)

Has anyone experienced something similar or knows what might cause this?

Hey @thegiantdom,

I’ve marked this topic as no-bug, because I think that this is just how it works and it’s not Bricks related.

When you click on the menu item in the page, it just scrolls you down and aligns the top of the page with the anchor.

But, when you open the header menu via hamburger button, the menu pushes the whole website down. So when you click on the anchor link, here is what happens:

  1. browser correctly aligns the top of the page (which now contains the menu) to the anchor
  2. the menu is closed
  3. the whole page is moved up (to fill the place where the menu was visible before)
  4. visually, it appears that the browser did not aligned the anchor correctly, but in fact it did, it’s just that the page content changed.

That’s why I think it’s not a bug in Bricks.

Best regards,
Matej

1 Like

thanks for the fast reply, you just saved me!

  • oh I see.. I got rid of the issue by letting the offcanvas fly in from the side. would there be another way to do that properly / ignore the menu?
1 Like

Hey @thegiantdom,

I’m glad that it’s working now =)

I haven’t checked your site in detail, but setting “Effect” on the Offcanvas to “Slide” or leaving it empty will probably work.

Best regards,
Matej

1 Like