Not sure if this gives you what you are looking for. I've found that you run into problems when a NavigationView is too global.
import SwiftUI
struct TestSelectionView: View {
@FocusState var focused: Bool?
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
HStack {
NavigationView {
VStack {
NavigationLink(destination: Text("gone to left 1").focusable(), label: {
Text("Left 1").focusable()
})
}
}
NavigationView {
VStack {
NavigationLink(destination: Text("gone to right 1").focusable(), label: {
Text("right 1").focusable()
})
NavigationLink(destination: Text("gone to right 2").focusable(), label: {
Text("right 2").focusable()
})
.focused($focused, equals: true)
.onAppear {
self.focused = true
}
NavigationLink(destination: Text("gone to right 3").focusable(), label: {
Text("right 3").focusable()
})
}
}
}
.padding(.top, 50)
}
.padding()
}
}
#Preview {
TestSelectionView()
}
code-block