I appreciate that Xcode 12 is in its first beta state but this seems (on initial glance) to be a fairly major bug so I'm wondering if I've missed something...
The issue is with TextField when viewing it in a live Preview. Although the view is interactive (scrolling vertically seems to be OK within Forms and Lists) and a cursor appears in the TextField view when it is touched, keyboard input is ignored. (this is a
The same code works as expected in Xcode 11.5. Simulator in both 11.5 and 12 exhibits expected behaviour.
Is this a bug? I am running Catalina (10.15.5) so perhaps there's a compatibility issue and the issue would resolve with Big Sur? I know there is an issue with interactivity in Preview with multiple views inside PreviewProvider but I'd assumed this is if you'd added multiple Views to the same body of this struct.
The code below replicates the problem:
import SwiftUI
struct ContentView: View {
@State private var text = ""
var body: some View {
Form {
TextField("Enter text here", text: $text)
}
}
}