Looks like the bug is back in iOS17. See the code below.
When you start the app and show the fullScreenCover, it works as expected.
However if you show the sheet, the keyboard button does not show anymore. And it will not show even in fullScreenCover until you restart the app.
struct ContentView: View {
@State var isSheetPresented = false
@State var isCoverPresented = false
var body: some View {
VStack {
Button("Show sheet (not working)") { isSheetPresented = true }
Button("Show cover (working)") { isCoverPresented = true }
}
.sheet(isPresented: $isSheetPresented) { SubView(isPresented: $isSheetPresented) }
.fullScreenCover(isPresented: $isCoverPresented) { SubView(isPresented: $isCoverPresented) }
}
}
struct SubView: View {
@State var text = ""
@Binding var isPresented: Bool
var body: some View {
NavigationView {
TextField("Text here...", text: $text)
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
Button("Dismiss") {
isPresented = false
}
}
ToolbarItemGroup(placement: .keyboard) {
Button("Keyboard button") {
print("keyboard button pressed")
}
}
}
}
}
}