diff options
author | Kyrylo Pronskykh <34245032+trantus@users.noreply.github.com> | 2024-01-19 07:02:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 22:02:49 -0800 |
commit | d514b13d62cedbd21c954388772ac07af5ff7f7c (patch) | |
tree | 3f50194dda6744ee1eb1ac1ab7fc6bcb7b1c1dfe /src | |
parent | 34c1aebda6e26e4557cffd124f03420659cb0aee (diff) | |
download | voidsky-d514b13d62cedbd21c954388772ac07af5ff7f7c.tar.zst |
fix: make alt text selectable in Lightbox (#2563)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/lightbox/Lightbox.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/view/com/lightbox/Lightbox.tsx b/src/view/com/lightbox/Lightbox.tsx index 2271bb9fb..ee096b0d2 100644 --- a/src/view/com/lightbox/Lightbox.tsx +++ b/src/view/com/lightbox/Lightbox.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {Pressable, StyleSheet, View} from 'react-native' +import {StyleSheet, View, Pressable} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import ImageView from './ImageViewing' import {shareImageModal, saveImageToMediaLibrary} from 'lib/media/manip' @@ -107,12 +107,16 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) { {altText ? ( <Pressable onPress={() => setAltExpanded(!isAltExpanded)} + onLongPress={() => {}} accessibilityRole="button"> - <Text - style={[s.gray3, styles.footerText]} - numberOfLines={isAltExpanded ? undefined : 3}> - {altText} - </Text> + <View> + <Text + selectable + style={[s.gray3, styles.footerText]} + numberOfLines={isAltExpanded ? undefined : 3}> + {altText} + </Text> + </View> </Pressable> ) : null} <View style={styles.footerBtns}> |