From 8f07afd74b5e5db84374206337fa1c81256857ec Mon Sep 17 00:00:00 2001 From: Emīls Date: Fri, 24 Apr 2026 11:17:39 +0200 Subject: Dismiss search upon entry search submission --- .../View controllers/SelectLocation/Views/FloatingSearchBar.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/MullvadVPN/View controllers/SelectLocation/Views/FloatingSearchBar.swift b/ios/MullvadVPN/View controllers/SelectLocation/Views/FloatingSearchBar.swift index bdc02afbb4..6984416b0c 100644 --- a/ios/MullvadVPN/View controllers/SelectLocation/Views/FloatingSearchBar.swift +++ b/ios/MullvadVPN/View controllers/SelectLocation/Views/FloatingSearchBar.swift @@ -22,6 +22,14 @@ struct FloatingSearchBar: View { .textInputAutocapitalization(.never) .focused(isFocused) .foregroundColor(.MullvadTextField.textInput) + .onSubmit { + if searchText.isEmpty { + withAnimation { + isExpanded = false + isFocused.wrappedValue = false + } + } + } } .padding(.horizontal, 16) .frame(height: 56) -- cgit v1.3-3-g829e