When I enter (or paste) text in a TextField
on macOS and the string requires more space than available in TextField
I would expect some sort of scrolling behaviour that moves along with the text cursor - like in almost every text field in the world. Instead I only see the beginning of the text and can't see my new input anymore. I cannot even scroll manually. Only if I enlarge the TextField
and then shrink it again, I am able to scroll through it. See video:
Is this a SwiftUI bug? Any known solutions for this?
Here's the code:
struct ContentView: View {
@State private var text: String = ""
var body: some View {
TextField("", text: $text)
.padding()
}
}