From 2db8e8883e9b207e55abd24df842b2aef0e89475 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Fri, 10 Jul 2026 11:56:55 +0100 Subject: [PATCH 1/2] fix(nav): position menu popover at open time so it isn't off-screen on 404 pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The popover's right offset was computed by an x-bind:style binding that evaluates during Alpine init, while is still display:none (x-cloak removal is deferred to a microtask). Every measured rect reads 0, yielding right: px, and since the binding's only reactive dependency is `width`, it never re-evaluated on static pages like the 404 page — leaving the menu entirely off-screen. Compute both top and right in the existing open-time updater instead, where layout is measurable, and reposition on scroll/resize while open. Co-Authored-By: Claude Fable 5 --- .../components/navbar/mobile-menu.blade.php | 14 ++++--- ...avigationMobileMenuPopoverPositionTest.php | 41 +++++++++++++++++++ 2 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 tests/Feature/NavigationMobileMenuPopoverPositionTest.php diff --git a/resources/views/components/navbar/mobile-menu.blade.php b/resources/views/components/navbar/mobile-menu.blade.php index a21531f49..f4ba1f856 100644 --- a/resources/views/components/navbar/mobile-menu.blade.php +++ b/resources/views/components/navbar/mobile-menu.blade.php @@ -1,10 +1,13 @@