diff --git a/Sources/SkipUI/SkipUI/Containers/TabView.swift b/Sources/SkipUI/SkipUI/Containers/TabView.swift index 396f5c0f..fe6b9ca4 100644 --- a/Sources/SkipUI/SkipUI/Containers/TabView.swift +++ b/Sources/SkipUI/SkipUI/Containers/TabView.swift @@ -248,7 +248,10 @@ public struct TabView : View { private func navigate(controller navController: NavHostController, route: String) { navController.navigate(route) { - popUpTo(navController.graph.startDestinationId) { + // Clear back stack so that tabs don't participate in Android system back button + let destinationID = navController.currentBackStackEntry?.destination?.id ?? navController.graph.startDestinationId + popUpTo(destinationID) { + inclusive = true saveState = true } // Avoid multiple copies of the same destination when reselecting the same item