Skip to content

Commit

Permalink
fix: make alt text selectable in Lightbox
Browse files Browse the repository at this point in the history
  • Loading branch information
trantus committed Jan 18, 2024
1 parent 9cbd3c0 commit ee63655
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/view/com/lightbox/Lightbox.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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}>
Expand Down

0 comments on commit ee63655

Please sign in to comment.