From 434ae3cd9540e7496c4f390f6b999469623b558a Mon Sep 17 00:00:00 2001 From: Roman <51091564+jeanpierreroma@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:07:35 +0300 Subject: [PATCH] fix(bottom-sheet): stop swallowing the keyboard inset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `fillsHeight: true` applied `edgesIgnoringSafeArea(.bottom)`, which — like `ignoresSafeArea(.all)` — covers every safe-area region, `.keyboard` included. That switches off SwiftUI's keyboard avoidance for the whole sheet, so a host with a text field gets its content pinned under the keyboard with no way to scroll to it. The intent was only to let the sheet's background run under the home indicator, which is `.container`. Narrow it to that. dashwallet-ios hit this on the contested-name sheet, where the three action buttons sit outside the ScrollView and became unreachable while typing; it was worked around there with a Done toolbar and interactive scroll-dismiss. Every future sheet with a text field would have needed the same workaround. --- .../DashUIKit/Components/BottomSheet/BottomSheet.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/DashUIKit/Components/BottomSheet/BottomSheet.swift b/Sources/DashUIKit/Components/BottomSheet/BottomSheet.swift index 3a6a3e0..77dfdcd 100644 --- a/Sources/DashUIKit/Components/BottomSheet/BottomSheet.swift +++ b/Sources/DashUIKit/Components/BottomSheet/BottomSheet.swift @@ -75,7 +75,14 @@ public struct BottomSheet: 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