From 453babbec15a481008da20bde722d77fb06f461b Mon Sep 17 00:00:00 2001 From: Jay George Date: Thu, 14 May 2026 12:28:17 +0100 Subject: [PATCH 1/2] Fix the nav height being slightly too short on devices like iOS with taller address bars --- resources/css/core/layout.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/css/core/layout.css b/resources/css/core/layout.css index 8299d321b77..96d94fdaacc 100644 --- a/resources/css/core/layout.css +++ b/resources/css/core/layout.css @@ -3,7 +3,7 @@ .nav-main { @apply flex flex-col gap-6 py-6 px-2 sm:px-3 text-sm antialiased select-none; /* Same as the main element, accounting for the header with a class of h-14, which is the same as 3.5rem */ - @apply h-[calc(100vh-3.5rem)]; + @apply h-[calc(100dvh-3.5rem)]; @apply overflow-y-auto fixed top-14 start-0 w-48; @apply [&_svg]:text-gray-500 dark:[&_svg]:text-gray-500/85; /* Wait for the full page to load before allowing this transition otherwise you see the Sidebar animate in/out on load in Firefox (and sometimes Safari) */ From 749ed4ee5c6e3259b3e4eb0526d0d40c5b94ff7e Mon Sep 17 00:00:00 2001 From: Jay George Date: Thu, 14 May 2026 12:47:27 +0100 Subject: [PATCH 2/2] Fix mobile nav failing --- resources/css/core/layout.css | 3 +- .../js/components/global-header/Logo.vue | 21 ++- resources/js/components/nav/Nav.vue | 120 ++++++++++++------ .../js/components/nav/nav-toggle-channel.js | 19 +++ 4 files changed, 120 insertions(+), 43 deletions(-) create mode 100644 resources/js/components/nav/nav-toggle-channel.js diff --git a/resources/css/core/layout.css b/resources/css/core/layout.css index 96d94fdaacc..e374acc66fd 100644 --- a/resources/css/core/layout.css +++ b/resources/css/core/layout.css @@ -115,8 +115,9 @@ /* Mobile nav behavior */ @media (width < theme(--breakpoint-lg)) { .nav-main { - /* Always visible but off-screen by default */ + /* Always visible but off-screen until opened (do not rely on JS adding .nav-closed before first paint). */ @apply flex; + @apply -start-50; @apply bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700; } diff --git a/resources/js/components/global-header/Logo.vue b/resources/js/components/global-header/Logo.vue index a4f5ac2379a..c4b39163446 100644 --- a/resources/js/components/global-header/Logo.vue +++ b/resources/js/components/global-header/Logo.vue @@ -5,6 +5,7 @@ import StatamicLogo from '@/../svg/statamic-mark-lime.svg'; import ProBadge from './ProBadge.vue'; import { Link } from '@inertiajs/vue3'; import useStatamicPageProps from '@/composables/page-props.js'; +import { invokeCpNavToggle } from '@/components/nav/nav-toggle-channel.js'; const { logos, isPro, cmsName, version } = useStatamicPageProps(); const customLogoImage = computed(() => { @@ -15,14 +16,21 @@ const customLogoText = computed(() => logos?.text); const customLogo = computed(() => customLogoImage.value || customLogoText.value); function toggleNav() { - Statamic.$events.$emit('nav.toggle'); + invokeCpNavToggle(); }