Any idea why Field 3 and Field 5 do not get visible when active if the previous field was using the normal keyboard?
In the following code, if you tap on Field 1 and immediately after you tap on Field 3 or Field 5, they will not be visible; they get hidden by the keyboard.
Please note that Field 3 and Field 5 use the decimalPad keyboard while the rest of the fields use the standard keyboard.
struct TextFieldScrollingIssue: View {
@State private var testInput:String = ""
var body: some View {
VStack{
Form {
TextField("Field 1", text:$testInput)
Spacer()
Spacer()
Spacer()
Spacer()
Spacer()
Spacer()
Spacer()
Section(header: Text("Section 1: ")) {
TextField("Field 2", text:$testInput)
TextField("Field 3", text:$testInput)
.keyboardType(.decimalPad)
}
Section(header: Text("Section 2: ")) {
TextField("Field 4", text:$testInput)
TextField("Field 5", text:$testInput)
.keyboardType(.decimalPad)
}
}
}
}
}