commit 6c7c77263f9df4a13383f96b34bed9d4f29d6674
parent 585110ee37ac883cd4dfb985ee2c2dfea4bf6be5
Author: Michael Camilleri <[email protected]>
Date: Sat, 7 Feb 2026 15:54:38 +0900
Fix focus on app launch
Co-Authored-By: Claude 4.5 Sonnet <[email protected]>
Diffstat
| M | Listless/Views/TaskListView.swift | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Listless/Views/TaskListView.swift b/Listless/Views/TaskListView.swift
@@ -147,7 +147,10 @@ struct TaskListView: View {
onReturn: focusSelectedTask
)
.onAppear {
- // Focus repair will set to .scrollView if nil
+ // Set initial focus to enable keyboard navigation
+ if focusedField == nil {
+ focusedField = .scrollView
+ }
}
.onChange(of: focusedField) { oldValue, newValue in
handleFocusChange(from: oldValue, to: newValue)