diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx
index d5d92048ad..a6a411998d 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 (
diff --git a/src/components/Dialog/types.ts b/src/components/Dialog/types.ts
index 1ddab02eea..217b147200 100644
--- a/src/components/Dialog/types.ts
+++ b/src/components/Dialog/types.ts
@@ -66,10 +66,12 @@ export type DialogInnerProps =
accessibilityLabelledBy: A11yProps['aria-labelledby']
accessibilityDescribedBy: string
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
+ keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps']
}>
| DialogInnerPropsBase<{
label: string
accessibilityLabelledBy?: undefined
accessibilityDescribedBy?: undefined
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
+ keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps']
}>
diff --git a/src/components/dialogs/GifSelect.tsx b/src/components/dialogs/GifSelect.tsx
index 1afc588dad..133b3db8be 100644
--- a/src/components/dialogs/GifSelect.tsx
+++ b/src/components/dialogs/GifSelect.tsx
@@ -31,12 +31,12 @@ import {GifPreview} from './GifSelect.shared'
export function GifSelectDialog({
controlRef,
- onClose,
onSelectGif: onSelectGifProp,
+ onClose,
}: {
controlRef: React.RefObject<{open: () => void}>
- onClose: () => void
onSelectGif: (gif: Gif) => void
+ onClose?: () => void
}) {
const control = Dialog.useDialogControl()
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index ade37af1b6..e0f8a329b8 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -91,9 +91,9 @@ import {ComposerOpts} from '#/state/shell/composer'
import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
import {ComposerReplyTo} from '#/view/com/composer/ComposerReplyTo'
import {ExternalEmbed} from '#/view/com/composer/ExternalEmbed'
-import {GifAltText} from '#/view/com/composer/GifAltText'
import {LabelsBtn} from '#/view/com/composer/labels/LabelsBtn'
import {Gallery} from '#/view/com/composer/photos/Gallery'
+import {GifAltText} from '#/view/com/composer/photos/GifAltTextDialog'
import {OpenCameraBtn} from '#/view/com/composer/photos/OpenCameraBtn'
import {SelectGifBtn} from '#/view/com/composer/photos/SelectGifBtn'
import {SelectPhotoBtn} from '#/view/com/composer/photos/SelectPhotoBtn'
@@ -528,10 +528,6 @@ export const ComposePost = ({
openEmojiPicker?.(textInput.current?.getCursorPosition())
}, [openEmojiPicker])
- const focusTextInput = useCallback(() => {
- textInput.current?.focus()
- }, [])
-
const onSelectGif = useCallback(
(gif: Gif) => {
setExtLink({
@@ -813,11 +809,7 @@ export const ComposePost = ({
setError={setError}
/>
-
+
{!isMobile ? (
+
+
)
}
diff --git a/src/view/com/composer/photos/SelectGifBtn.tsx b/src/view/com/composer/photos/SelectGifBtn.tsx
index d13df0a110..24381ff452 100644
--- a/src/view/com/composer/photos/SelectGifBtn.tsx
+++ b/src/view/com/composer/photos/SelectGifBtn.tsx
@@ -11,8 +11,8 @@ import {GifSelectDialog} from '#/components/dialogs/GifSelect'
import {GifSquare_Stroke2_Corner0_Rounded as GifIcon} from '#/components/icons/Gif'
type Props = {
- onClose: () => void
onSelectGif: (gif: Gif) => void
+ onClose?: () => void
disabled?: boolean
}