Skip to content

Commit

Permalink
Merge pull request #23704 from Parshvi16/issue_23251
Browse files Browse the repository at this point in the history
fix: Select and copy does not copy New Expensify link in link format
  • Loading branch information
roryabraham authored Aug 1, 2023
2 parents fbb7ba5 + 520f09f commit 09b29cc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,17 @@ function BaseAnchorForCommentsOnly(props) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
hrefAttrs={{
rel: props.rel,
target: isEmail ? '_self' : props.target,
target: isEmail || !linkProps.href ? '_self' : props.target,
}}
href={linkProps.href || props.href}
onPress={(event) => {
if (!linkProps.onPress) {
return;
}

event.preventDefault();
linkProps.onPress();
}}
href={linkProps.href}
// Add testID so it gets selected as an anchor tag by SelectionScraper
testID="a"
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down

0 comments on commit 09b29cc

Please sign in to comment.