One-page menu issues: smooth scroll offset and sidebar active links.

edited November 2023 in Menu / Mega menu

Background

  • BeBuilder in use
  • Header template in use
  • Burger menu in use
  • Custom sidebar in use
  • Menu items set with anchors (but not with class=scroll)
  • Page set to "One page"

Issues

  • Sidebar menu items not updating with "active" (.current-menu-item) on scroll
  • Scroll offset incorrect when sticky header is set to position:absolute

Resolutions?

  • theme.js code
    • onePageActive() function doesn't check for sidebar menu
      • Perhaps include .mfn-sidemenu-menu in programming?
    • onePageActive() function uses innerHeight of #mfn-header-template, even though position:fixed is in use
      • Perhaps check for scenario where sticky is fixed to set the offset to 0?

A temporary example can be seen at https://rb.gy/emi060

Happy to share credentials for on-site debugging whilst the site is still under development.

Comments

Sign In or Register to comment.