allow scrolling with keyboard open
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
|||||||
parseEmbedPlayerFromUrl,
|
parseEmbedPlayerFromUrl,
|
||||||
} from '#/lib/strings/embed-player'
|
} from '#/lib/strings/embed-player'
|
||||||
import {enforceLen} from '#/lib/strings/helpers'
|
import {enforceLen} from '#/lib/strings/helpers'
|
||||||
import {isAndroid} from '#/platform/detection'
|
|
||||||
import {Gif} from '#/state/queries/tenor'
|
import {Gif} from '#/state/queries/tenor'
|
||||||
import {GifEmbed} from '#/view/com/util/post-embeds/GifEmbed'
|
import {GifEmbed} from '#/view/com/util/post-embeds/GifEmbed'
|
||||||
import {atoms as a, native, useTheme} from '#/alf'
|
import {atoms as a, native, useTheme} from '#/alf'
|
||||||
@@ -98,7 +97,7 @@ export function GifAltText({
|
|||||||
|
|
||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={control}
|
control={control}
|
||||||
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
|
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
|
||||||
<Dialog.Handle />
|
<Dialog.Handle />
|
||||||
<AltTextInner
|
<AltTextInner
|
||||||
onSubmit={onPressSubmit}
|
onSubmit={onPressSubmit}
|
||||||
@@ -132,7 +131,9 @@ function AltTextInner({
|
|||||||
}, [onSubmit, altText])
|
}, [onSubmit, altText])
|
||||||
|
|
||||||
return (
|
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.flex_col_reverse}>
|
||||||
<View style={[a.mt_md, a.gap_md]}>
|
<View style={[a.mt_md, a.gap_md]}>
|
||||||
<View>
|
<View>
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ type Props = {
|
|||||||
|
|
||||||
export const ImageAltTextDialog = (props: Props): React.ReactNode => {
|
export const ImageAltTextDialog = (props: Props): React.ReactNode => {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer
|
||||||
|
control={props.control}
|
||||||
|
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
|
||||||
<Dialog.Handle />
|
<Dialog.Handle />
|
||||||
|
|
||||||
<ImageAltTextInner {...props} />
|
<ImageAltTextInner {...props} />
|
||||||
@@ -66,13 +68,15 @@ const ImageAltTextInner = ({
|
|||||||
}, [image, windim])
|
}, [image, windim])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.ScrollableInner label={_(msg`Add alt text`)}>
|
<Dialog.ScrollableInner
|
||||||
|
label={_(msg`Add alt text`)}
|
||||||
|
keyboardDismissMode="none">
|
||||||
<View>
|
<View>
|
||||||
<Text style={[a.text_2xl, a.font_bold, a.leading_tight, a.pb_sm]}>
|
<Text style={[a.text_2xl, a.font_bold, a.leading_tight, a.pb_sm]}>
|
||||||
<Trans>Add alt text</Trans>
|
<Trans>Add alt text</Trans>
|
||||||
</Text>
|
</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
|
<Image
|
||||||
style={imageStyle}
|
style={imageStyle}
|
||||||
source={{
|
source={{
|
||||||
@@ -114,6 +118,7 @@ const ImageAltTextInner = ({
|
|||||||
</ButtonText>
|
</ButtonText>
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user