Skip to main content

Scattered Menu On Page Load

Comments

2 comments

  • Chad Smith

    We created a workaround.

    Workaround that fixes UX:

    • Add a class to <html> after DOMContentLoaded and hide Brizy menu until ready:

      • JS: document.documentElement.classList.add("brz-menu-ready");

      • <script>
          document.addEventListener("DOMContentLoaded", function () {
            requestAnimationFrame(function () {
              document.documentElement.classList.add("brz-menu-ready");
            });
          });
        </script>
      • CSS: html:not(.brz-menu-ready) nav.brz-mm-menu { visibility:hidden; } (desktop breakpoint only)

      • @media (min-width: 992px) {
          html:not(.brz-menu-ready) .brz-menu {
            visibility: hidden !important;
          }
        }

    Request:

    • Please fix the initial paint so off-canvas/mmenu is hidden on desktop before first render (no flash), and/or ensure header/menu CSS required for desktop is render-blocking or applied before paint.

    0
  • Ariel H.

    Hi Chad,

    Thank you for contacting us and for sharing your solution.

    This is a known issue and has already been reported to our developers, so it can be addressed in an upcoming update.

    We apologize for the inconvenience.

    Best regards,
    Ariel H.

    0

Please sign in to leave a comment.