diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index d5d92048ad..cda31bae73 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -1,9 +1,8 @@ import React, {useImperativeHandle} from 'react' import { - Dimensions, - Keyboard, Pressable, StyleProp, + useWindowDimensions, View, ViewStyle, } from 'react-native' @@ -96,6 +95,7 @@ export function Outer({ const insets = useSafeAreaInsets() const closeCallbacks = React.useRef<(() => void)[]>([]) const {setDialogIsOpen} = useDialogStateControlContext() + const {height: windowHeight} = useWindowDimensions() /* * Used to manage open/closed, but index is otherwise handled internally by `BottomSheet` @@ -179,8 +179,7 @@ export function Outer({ // Android importantForAccessibility="yes" style={[a.absolute, a.inset_0]} - testID={testID} - onTouchMove={() => Keyboard.dismiss()}> + testID={testID}> @@ -243,11 +242,20 @@ export function Inner({children, style}: DialogInnerProps) { export const ScrollableInner = React.forwardRef< BottomSheetScrollViewMethods, DialogInnerProps ->(function ScrollableInner({children, style}, ref) { +>(function ScrollableInner( + { + children, + style, + keyboardShouldPersistTaps = 'handled', + keyboardDismissMode = 'on-drag', + }, + ref, +) { const insets = useSafeAreaInsets() return ( | DialogInnerPropsBase<{ label: string accessibilityLabelledBy?: undefined accessibilityDescribedBy?: undefined keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'] + keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps'] }>