fix: Add button moved to sticky bottom bar — always tappable on first tap
- Button outside ScrollView using safeAreaInset(edge: .bottom) - No more scroll gesture eating the first tap - scrollDismissesKeyboard(.immediately) for keyboard handling - Swipe to delete on meal entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,8 +165,12 @@ struct AddFoodSheet: View {
|
||||
.font(.caption)
|
||||
.foregroundStyle(.red)
|
||||
}
|
||||
|
||||
// Add button
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.scrollDismissesKeyboard(.immediately)
|
||||
.background(Color.canvas)
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
Button {
|
||||
addEntry()
|
||||
} label: {
|
||||
@@ -184,10 +188,10 @@ struct AddFoodSheet: View {
|
||||
.foregroundStyle(.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||
.disabled(isAdding)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, 8)
|
||||
.background(Color.canvas)
|
||||
}
|
||||
.navigationTitle("Add Food")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
|
||||
Reference in New Issue
Block a user