Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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