Skip to content

Commit acc810b

Browse files
committed
fix(example): use onLongPress in TextPropsDemo
Text `selectable` is unreliable on Android inside a ScrollView (react-native#29232) — the ScrollView cancels the long-press at the slightest movement. The example screen wraps every demo in a ScrollView, so the original `selectable` cell could never trigger a copy menu. Switch to `onLongPress` which works inside a ScrollView and still exercises the EaseText TextProps passthrough.
1 parent 827c7f6 commit acc810b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

example/src/demos/TextPropsDemo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export function TextPropsDemo() {
2525
interpolateColor={active ? '#e94560' : '#ccd6f6'}
2626
animate={{ opacity: active ? 1 : 0.7 }}
2727
transition={{ type: 'timing', duration: 300 }}
28-
selectable
28+
onLongPress={() => Alert.alert('Long-press', 'onLongPress fired')}
2929
style={styles.selectable}
3030
>
31-
This text is selectable — long press to copy
31+
Long-press me — onLongPress fires an Alert
3232
</EaseText>
3333

3434
<EaseText

0 commit comments

Comments
 (0)