diff --git a/resources/views/partials/nav-main.blade.php b/resources/views/partials/nav-main.blade.php
index 29401900623..d8963a2ca80 100644
--- a/resources/views/partials/nav-main.blade.php
+++ b/resources/views/partials/nav-main.blade.php
@@ -14,7 +14,7 @@
attributes() }}>
{!! $item->icon() !!}{{ __($item->name()) }}
- @if ($item->children() && $item->isActive())
+ @if ($item->children() && ($item->isActive() || $item->hasActiveChild()))
@foreach ($item->children() as $child)
-
diff --git a/resources/views/partials/nav-mobile.blade.php b/resources/views/partials/nav-mobile.blade.php
index 047a90e77d0..6fcbb4b0dd2 100644
--- a/resources/views/partials/nav-mobile.blade.php
+++ b/resources/views/partials/nav-mobile.blade.php
@@ -13,7 +13,7 @@
{!! $item->icon() !!}{{ __($item->name()) }}
- @if ($item->children() && $item->isActive())
+ @if ($item->children() && ($item->isActive() || $item->hasActiveChild()))
@foreach ($item->children() as $child)
-
diff --git a/src/CP/Navigation/NavItem.php b/src/CP/Navigation/NavItem.php
index 787977bda16..454ae6d8efa 100644
--- a/src/CP/Navigation/NavItem.php
+++ b/src/CP/Navigation/NavItem.php
@@ -2,6 +2,7 @@
namespace Statamic\CP\Navigation;
+use Illuminate\Support\Collection;
use Statamic\Facades\CP\Nav;
use Statamic\Statamic;
use Statamic\Support\Html;
@@ -326,6 +327,16 @@ public function isActive()
return preg_match('#'.$pattern.'#', request()->decodedPath()) === 1;
}
+ /**
+ * Get whether the nav item has a currently active child.
+ *
+ * @return bool
+ */
+ public function hasActiveChild()
+ {
+ return $this->children() instanceof Collection && $this->children()->first(fn ($item) => $item->isActive()) !== null;
+ }
+
/**
* Get or set custom view.
*