Skip to content

Commit 2b5625d

Browse files
author
Mihail
committed
[iOS 26] Fix NavigationPage blank screen after rapidly pushing and popping pages
1 parent e10b0be commit 2b5625d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,11 @@ void RemoveViewControllers(bool animated)
741741
// Also worth noting this task returns on the main thread
742742
if (t.Result)
743743
return;
744-
// because we skip the normal pop process we need to dispose ourselves
745-
controller?.Dispose();
744+
// Only dispose if the controller was actually removed from the navigation stack.
745+
// 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();
746749
}, TaskScheduler.FromCurrentSynchronizationContext());
747750
}
748751

0 commit comments

Comments
 (0)