Skip to content

Commit

Permalink
Merge pull request #25599 from dukenv0307/fix/24456
Browse files Browse the repository at this point in the history
Fix "Copy URL to clipboard" not working by long tap
  • Loading branch information
danieldoglas authored Aug 22, 2023
2 parents 494847a + f397714 commit c5fc369
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
lodashGet(linkRef, 'current'),
);
}}
onPress={linkProps.onPress}
onPress={(event) => {
if (!linkProps.onPress) {
return;
}

event.preventDefault();
linkProps.onPress();
}}
onPressIn={onPressIn}
onPressOut={onPressOut}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
Expand All @@ -80,14 +87,6 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
target: isEmail || !linkProps.href ? '_self' : target,
}}
href={linkProps.href || href}
onPress={(event) => {
if (!linkProps.onPress) {
return;
}

event.preventDefault();
linkProps.onPress();
}}
suppressHighlighting
// Add testID so it gets selected as an anchor tag by SelectionScraper
testID="a"
Expand Down

0 comments on commit c5fc369

Please sign in to comment.