Add keyboard dismiss toolbar for iOS numeric and multi-line fields
Creates a reusable KeyboardDismissToolbar view modifier that adds a "Done" button to dismiss keyboards that don't have a return key. Applied to all numeric keyboards (numberPad, decimalPad, phonePad) and multi-line text inputs (TextEditor, TextField with axis: .vertical). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,7 @@ struct CompleteTaskView: View {
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.leading, 12)
|
||||
.keyboardDismissToolbar()
|
||||
} label: {
|
||||
Label(L10n.Tasks.actualCost, systemImage: "dollarsign.circle")
|
||||
}
|
||||
@@ -132,6 +133,7 @@ struct CompleteTaskView: View {
|
||||
TextEditor(text: $notes)
|
||||
.frame(minHeight: 100)
|
||||
.scrollContentBackground(.hidden)
|
||||
.keyboardDismissToolbar()
|
||||
}
|
||||
} footer: {
|
||||
Text(L10n.Tasks.optionalNotes)
|
||||
|
||||
Reference in New Issue
Block a user