History

Prevent Add Project sheet from collapsing on relayout (#3759)

Julius Marminge committed 4 months ago

Commit f9727d01 parent d8e0ba31 file · +6 −1Browse files

Unified · Split

apps/mobile/src/features/projects/AddProjectScreen.tsx+6−1
@@ -112,7 +112,12 @@ function AddProjectShell(props: { readonly children: ReactNode }) { · 111 unmodified lines
112112 const insets = useSafeAreaInsets();
113113
114114 return (
115− <View className="flex-1 bg-sheet">
115+ // collapsable={false} is load-bearing: if this wrapper is flattened, the
116+ // ScrollView lands directly under RNSSafeAreaView and RNS's formSheet
117+ // scroll-view frame correction mistakes this full-height wrapper for a
118+ // "header" sibling, coercing the ScrollView to zero height (blank sheet
119+ // as soon as the sheet re-lays-out, e.g. when the keyboard opens).
120+ <View collapsable={false} className="flex-1 bg-sheet">
116121 <ScrollView
117122 keyboardShouldPersistTaps="handled"
118123 contentInsetAdjustmentBehavior="automatic"