From a34a96d9d62b6fc8df66cdb04f18e456d095b9e7 Mon Sep 17 00:00:00 2001 From: Joe Masilotti Date: Wed, 15 Oct 2025 09:19:29 -0700 Subject: [PATCH] Don't pop if not redirecting from MODAL session --- Source/Turbo/Navigator/Navigator.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Turbo/Navigator/Navigator.swift b/Source/Turbo/Navigator/Navigator.swift index 9c5b0655..0f35583b 100644 --- a/Source/Turbo/Navigator/Navigator.swift +++ b/Source/Turbo/Navigator/Navigator.swift @@ -172,7 +172,8 @@ public class Navigator { extension Navigator: SessionDelegate { public func session(_ session: Session, didProposeVisit proposal: VisitProposal) { - if proposal.isRedirect { + // Pop the default context controller if we are redirecting in the modal session. + if proposal.isRedirect && session === modalSession { // Animate the pop only if we're in the active modal session // and the visit is proposed on the default context. let animatePop = session === modalSession && proposal.context == .default