allow scrolling with keyboard open

This commit is contained in:
Samuel Newman
2024-09-30 15:16:08 +03:00
parent b9452ba15a
commit 54003e7dc5
2 changed files with 12 additions and 6 deletions
@@ -12,7 +12,6 @@ import {
parseEmbedPlayerFromUrl,
} from '#/lib/strings/embed-player'
import {enforceLen} from '#/lib/strings/helpers'
import {isAndroid} from '#/platform/detection'
import {Gif} from '#/state/queries/tenor'
import {GifEmbed} from '#/view/com/util/post-embeds/GifEmbed'
import {atoms as a, native, useTheme} from '#/alf'
@@ -98,7 +97,7 @@ export function GifAltText({
<Dialog.Outer
control={control}
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
<Dialog.Handle />
<AltTextInner
onSubmit={onPressSubmit}
@@ -132,7 +131,9 @@ function AltTextInner({
}, [onSubmit, altText])
return (
<Dialog.ScrollableInner label={_(msg`Add alt text`)}>
<Dialog.ScrollableInner
label={_(msg`Add alt text`)}
keyboardDismissMode="none">
<View style={a.flex_col_reverse}>
<View style={[a.mt_md, a.gap_md]}>
<View>
@@ -21,7 +21,9 @@ type Props = {
export const ImageAltTextDialog = (props: Props): React.ReactNode => {
return (
<Dialog.Outer control={props.control}>
<Dialog.Outer
control={props.control}
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
<Dialog.Handle />
<ImageAltTextInner {...props} />
@@ -66,13 +68,15 @@ const ImageAltTextInner = ({
}, [image, windim])
return (
<Dialog.ScrollableInner label={_(msg`Add alt text`)}>
<Dialog.ScrollableInner
label={_(msg`Add alt text`)}
keyboardDismissMode="none">
<View>
<Text style={[a.text_2xl, a.font_bold, a.leading_tight, a.pb_sm]}>
<Trans>Add alt text</Trans>
</Text>
<View style={[t.atoms.bg_contrast_50, a.rounded_sm, a.overflow_hidden]}>
<View style={[t.atoms.bg_contrast_50, a.rounded_md, a.overflow_hidden]}>
<Image
style={imageStyle}
source={{
@@ -114,6 +118,7 @@ const ImageAltTextInner = ({
</ButtonText>
</Button>
</View>
<Dialog.Close />
</Dialog.ScrollableInner>
)