From 2304ed59bc5d9f41cf5caf96b7e0790b7be27bf4 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 3 Apr 2025 11:05:09 -0600 Subject: [PATCH] Update PreventNavigation.tsx --- web/src/components/ui/layouts/PreventNavigation.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/ui/layouts/PreventNavigation.tsx b/web/src/components/ui/layouts/PreventNavigation.tsx index 21f92c891..99575f186 100644 --- a/web/src/components/ui/layouts/PreventNavigation.tsx +++ b/web/src/components/ui/layouts/PreventNavigation.tsx @@ -58,6 +58,11 @@ export const PreventNavigation: React.FC = React.memo( target = target.parentElement as HTMLElement; } + // Check if we're navigating to the same URL - if so, allow the navigation + if (href && new URL(href).pathname === window.location.pathname) { + return; // Allow navigation to the same URL + } + if (isDirty) { event.preventDefault(); event.stopPropagation();