fix: single keyboard Done toolbar on Complete Task (closes #5) #8

Merged
admin merged 1 commits from fix/5-double-done-button into master 2026-05-11 13:35:14 -05:00
Owner

Closes #5.

Root cause

CompleteTaskView applied .keyboardDismissToolbar() twice — once on the actualCost TextField (line 123) and once on the notes TextEditor (line 145). Each application installs a separate ToolbarItemGroup(placement: .keyboard). SwiftUI accumulates these on the responder chain, so focusing any field rendered two stacked "Done" buttons above the keyboard, matching the screenshot in the issue.

Fix

Move .keyboardDismissToolbar() up to the Form root so a single keyboard toolbar is registered for the whole screen. Matches the pattern already used by TaskFormView (one root-level ToolbarItemGroup(placement: .keyboard)).

Verification

  • Manual: Complete Task → focus the Notes field → keyboard shows one Done button.
  • Build: xcodebuild build -project iosApp/honeyDue.xcodeproj -scheme HoneyDue → BUILD SUCCEEDED.

No new tests added — this is a SwiftUI layout fix, not a behaviour change.

Closes #5. ## Root cause `CompleteTaskView` applied `.keyboardDismissToolbar()` twice — once on the `actualCost` TextField (line 123) and once on the `notes` TextEditor (line 145). Each application installs a separate `ToolbarItemGroup(placement: .keyboard)`. SwiftUI accumulates these on the responder chain, so focusing *any* field rendered two stacked "Done" buttons above the keyboard, matching the screenshot in the issue. ## Fix Move `.keyboardDismissToolbar()` up to the `Form` root so a single keyboard toolbar is registered for the whole screen. Matches the pattern already used by `TaskFormView` (one root-level `ToolbarItemGroup(placement: .keyboard)`). ## Verification - Manual: `Complete Task` → focus the `Notes` field → keyboard shows one Done button. - Build: `xcodebuild build -project iosApp/honeyDue.xcodeproj -scheme HoneyDue` → BUILD SUCCEEDED. No new tests added — this is a SwiftUI layout fix, not a behaviour change.
admin added 1 commit 2026-05-11 12:58:29 -05:00
fix: single keyboard Done toolbar on Complete Task (closes gitea#5)
Android UI Tests / ui-tests (pull_request) Has been cancelled
23f4d70ac1
The actualCost TextField and the notes TextEditor each had their own
`.keyboardDismissToolbar()` modifier, which installs a separate
`ToolbarItemGroup(placement: .keyboard)`. SwiftUI accumulates these
on the responder chain, so focusing any field rendered two "Done"
buttons stacked above the keyboard (issue screenshot in gitea#5).

Move the modifier up to the Form root so exactly one keyboard
toolbar is registered for the entire screen, matching the pattern
already used by `TaskFormView`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
admin merged commit bd27f32caa into master 2026-05-11 13:35:14 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/honeyDueKMP#8