iOS 27 regression - minimized search item in top toolbar breaks its state

struct ContentView: View {
    @State var searchText: String = ""
    var body: some View {
        TabView {
            Tab {
                NavigationStack {
                    List {
                        Text("Hello!")
                        Text("Hello!")
                        Text("Hello!")
                        Text("Hello!")
                        Text("Hello!")
                        Text("Hello!")
                    }
                    .navigationTitle("Have a title")
                    .searchable(text: $searchText, placement: .toolbar)
                    .searchToolbarBehavior(.minimize)
                    .toolbar {
                        DefaultToolbarItem(kind: .search, placement: .topBarTrailing)
                    }
                }
            }
        }
    }
}

In iOS 26, this worked no problem. In iOS 27, this leaves the search bar either unable to collapse (when pressing the close button) or in a broken state where it cannot be opened again.

FB24779236

I have just written a Feedback Assistant report for this issue

iOS 27 regression - minimized search item in top toolbar breaks its state
 
 
Q