TVOS 17 - Text Field in Alert adds a Button

When adding a textfield to an alert in SwiftUI (as shown below) the behavior changes from TVOS 16 to TVOS 17. In the simulator running TVOS 17, it displays an additional button labeled with the text from inside the textfield when the alert is presented. So, the alert below would have two buttons. One button would be labeled "OK" and run addFunction, and the other is labeled with whatever is in $url when the alert is presented and does nothing.

Button { 
             showAlert = true
             } label: {
             Image(systemName: "plus")
             }
             .alert("Add", isPresented: $showAlert) {
                        Button("OK", action: addFunction)
                        TextField("Enter URL", text: $url)
                            .keyboardType(.URL)
             }

We can achieve buttons and textField correctly by not adding a placeholder to your textField in Alert. There is some bug with SwiftUI, if we add a placeholder to textField.

Here is how to achieve Alert with textField and buttons:

.alert("Alert Title!", isPresented: $showingAlert) {
    TextField(text: $name) {}
    Button("Submit") {
        print("Submit")
    }
    Button("Skip") {
        print("Skip")
    }
} message: {
    Text("Enter channel name")
}
TVOS 17 - Text Field in Alert adds a Button
 
 
Q