Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Sources/DashUIKit/Components/BottomSheet/BottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ public struct BottomSheet<Content: View>: View {

Group {
if fillsHeight {
sheet.edgesIgnoringSafeArea(.bottom)
// `.container` rather than every region: the point is to let the
// sheet's background run under the home indicator, and
// `edgesIgnoringSafeArea` — like `ignoresSafeArea(.all)` — also
// swallows `.keyboard`, which switches off SwiftUI's keyboard
// avoidance for the whole sheet. Hosts with a text field then
// find their content pinned under the keyboard with no way to
// scroll to it.
sheet.ignoresSafeArea(.container, edges: .bottom)
} else {
// Publish the natural content height for `.selfSizingSheet()`. The bottom safe area is
// intentionally NOT ignored here, so the measured height excludes the home-indicator
Expand Down
Loading