From 2ffd7522dc02e2f918d8fa69d48ec47e64931b86 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 12 Feb 2026 00:03:55 +0100 Subject: [PATCH] Made use of the "onResignFocus()" function within the NewTaskView and the TaskListContent views in the app target. --- App/Sources/Views/NewTaskView.swift | 4 +++- App/Sources/Views/TaskList/TaskListContent.swift | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/App/Sources/Views/NewTaskView.swift b/App/Sources/Views/NewTaskView.swift index 7b95d0b..e5485de 100644 --- a/App/Sources/Views/NewTaskView.swift +++ b/App/Sources/Views/NewTaskView.swift @@ -50,7 +50,8 @@ struct NewTaskView: View { Section("view.new-task.section.task") { TextField( "view.new-task.placeholder.title", - text: $viewModel.title + text: $viewModel.title, + axis: .vertical ) .autocapitalization(.sentences) .autocorrectionDisabled(false) @@ -78,6 +79,7 @@ struct NewTaskView: View { } .navigationTitle("view.new-task.navigation.title") .navigationBarTitleDisplayMode(.inline) + .onResignFocus() .toolbar { ToolbarItem(placement: .cancellationAction) { Button(role: .cancel) { diff --git a/App/Sources/Views/TaskList/TaskListContent.swift b/App/Sources/Views/TaskList/TaskListContent.swift index d093caa..ed79fc7 100644 --- a/App/Sources/Views/TaskList/TaskListContent.swift +++ b/App/Sources/Views/TaskList/TaskListContent.swift @@ -124,6 +124,7 @@ extension TaskListView { items } .listStyle(.grouped) + .onResignFocus() } } }