summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2026-04-24 11:17:39 +0200
committerEmīls <emils@mullvad.net>2026-04-24 11:17:39 +0200
commit8f07afd74b5e5db84374206337fa1c81256857ec (patch)
treec89b01ad88302c89664601eb112674098a733cbc
parenta82e1d006268adbbb4afb24b3a9fcf47d979df74 (diff)
downloadmullvadvpn-8f07afd74b5e5db84374206337fa1c81256857ec.tar.xz
mullvadvpn-8f07afd74b5e5db84374206337fa1c81256857ec.zip
Dismiss search upon entry search submission
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/Views/FloatingSearchBar.swift8
1 files changed, 8 insertions, 0 deletions
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)