diff --git a/Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobilePrimaryTabScaffold.swift b/Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobilePrimaryTabScaffold.swift index 076a0688f869..b12a3d772d94 100644 --- a/Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobilePrimaryTabScaffold.swift +++ b/Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/MobilePrimaryTabScaffold.swift @@ -43,18 +43,22 @@ struct MobilePrimaryTabScaffold< primaryTabs Tab(value: MobilePrimaryTab.search, role: .search) { + // Scoped to the search tab's content: a TabView-level + // searchable is inherited by every tab's navigation bar, + // which rendered a second, top search field on the + // workspaces and notifications tabs. searchDestination + .searchable( + text: activeSearchText, + isPresented: searchPresentation, + prompt: activeSearchPrompt + ) + .onSubmit(of: .search) { + selection = searchCoordinator.commitSubmit() + } } .accessibilityIdentifier("MobilePrimaryTabSearch") } - .searchable( - text: activeSearchText, - isPresented: searchPresentation, - prompt: activeSearchPrompt - ) - .onSubmit(of: .search) { - selection = searchCoordinator.commitSubmit() - } .tabViewSearchActivation(.searchTabSelection) .accessibilityIdentifier("MobilePrimaryTabs") .onChange(of: selection, initial: true) { _, selection in