We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e10b0be commit 2b5625dCopy full SHA for 2b5625d
1 file changed
src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs
@@ -741,8 +741,11 @@ void RemoveViewControllers(bool animated)
741
// Also worth noting this task returns on the main thread
742
if (t.Result)
743
return;
744
- // because we skip the normal pop process we need to dispose ourselves
745
- controller?.Dispose();
+ // Only dispose if the controller was actually removed from the navigation stack.
+ // On iOS 26, interrupted transitions and subsequent navigations can complete
746
+ // this task with false even when the controller is still visible.
747
+ if (controller is not null && !ViewControllers.Contains(controller))
748
+ controller.Dispose();
749
}, TaskScheduler.FromCurrentSynchronizationContext());
750
}
751
0 commit comments