Restore search field activation when selecting the search tab on iOS 27

iOS 27 changed the default TabSearchActivation so a role: .search tab no
longer focuses the search field on selection. Opt back into the iOS 26
behavior with .tabViewSearchActivation(.searchTabSelection).
This commit is contained in:
Arkadiusz Fal
2026-09-30 23:57:22 +02:00
parent 123be0b3ff
commit 8a8f3a6000

View File

@@ -342,6 +342,9 @@ extension View {
MiniPlayerView(isTabAccessory: true)
}
.tabBarMinimizeBehavior(behavior)
// iOS 27 stopped focusing the search field when the search tab is
// selected; restore the iOS 26 behavior explicitly.
.tabViewSearchActivation(.searchTabSelection)
} else {
self
}