Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectable works on iOS but not on Android. #99

Open
anilios opened this issue Apr 20, 2021 · 2 comments
Open

selectable works on iOS but not on Android. #99

anilios opened this issue Apr 20, 2021 · 2 comments

Comments

@anilios
Copy link

anilios commented Apr 20, 2021

When setting selectable = {true} for ParsedText, the copy option appears just fine on iOS on long press. But on android, it does not appear. I was able to see the copy option once in a while on Android also but it is 99% of the time not working.

<ParsedText selectable style={styles.textStyle} parse={[ {type: 'url', style: styles.userNameStyle, onPress: onLink }, { pattern: /userMentionStart-(.*?)-userMentionEnd/, style: styles.userNameStyle, onPress: (id, matchIndex) => {onUser(parseUserId(id));}, renderText: (matchingString, matches) => mapUser(parseUserId(matchingString)) }, { pattern: /hashtagMentionStart-(.*?)-hashtagMentionEnd/, style: styles.hashTag, onPress: (id, matchIndex) => {onHashtag(parseHashtagId(id));}, renderText: (matchingString, matches) => mapHashtag(parseHashtagId(matchingString)) }, {pattern: /#(\w+)/, style: styles.hashTag}, ]} childrenProps={{ allowFontScaling: false }} > { item.postText } </ParsedText>

@fredmanxu
Copy link

When setting selectable = {true} for ParsedText, the copy option appears just fine on iOS on long press. But on android, it does not appear. I was able to see the copy option once in a while on Android also but it is 99% of the time not working.

<ParsedText selectable style={styles.textStyle} parse={[ {type: 'url', style: styles.userNameStyle, onPress: onLink }, { pattern: /userMentionStart-(.*?)-userMentionEnd/, style: styles.userNameStyle, onPress: (id, matchIndex) => {onUser(parseUserId(id));}, renderText: (matchingString, matches) => mapUser(parseUserId(matchingString)) }, { pattern: /hashtagMentionStart-(.*?)-hashtagMentionEnd/, style: styles.hashTag, onPress: (id, matchIndex) => {onHashtag(parseHashtagId(id));}, renderText: (matchingString, matches) => mapHashtag(parseHashtagId(matchingString)) }, {pattern: /#(\w+)/, style: styles.hashTag}, ]} childrenProps={{ allowFontScaling: false }} > { item.postText } </ParsedText>

the same problem, have you solved it?

@khudratov
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants