diff --git a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
index 21c1ea618841..4a002ef49cf1 100644
--- a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
+++ b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
@@ -1,6 +1,6 @@
import _ from 'underscore';
import React from 'react';
-import {View, StyleSheet} from 'react-native';
+import {StyleSheet} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import Str from 'expensify-common/lib/str';
@@ -51,41 +51,39 @@ const BaseAnchorForCommentsOnly = (props) => {
const isEmail = Str.isValidEmailMarkdown(props.href.replace(/mailto:/i, ''));
return (
-
- {
- ReportActionContextMenu.showContextMenu(
- isEmail ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
- event,
- props.href,
- lodashGet(linkRef, 'current'),
- );
- }}
- onPress={linkProps.onPress}
- onPressIn={props.onPressIn}
- onPressOut={props.onPressOut}
- >
-
- (linkRef = el)}
- style={StyleSheet.flatten([props.style, defaultTextStyle])}
- accessibilityRole="link"
- hrefAttrs={{
- rel: props.rel,
- target: isEmail ? '_self' : props.target,
- }}
- 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
- {...rest}
- >
- {props.children}
-
-
-
-
+ {
+ ReportActionContextMenu.showContextMenu(
+ isEmail ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
+ event,
+ props.href,
+ lodashGet(linkRef, 'current'),
+ );
+ }}
+ onPress={linkProps.onPress}
+ onPressIn={props.onPressIn}
+ onPressOut={props.onPressOut}
+ >
+
+ (linkRef = el)}
+ style={StyleSheet.flatten([props.style, defaultTextStyle])}
+ accessibilityRole="link"
+ hrefAttrs={{
+ rel: props.rel,
+ target: isEmail ? '_self' : props.target,
+ }}
+ 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
+ {...rest}
+ >
+ {props.children}
+
+
+
);
};
diff --git a/src/components/AnchorForCommentsOnly/index.js b/src/components/AnchorForCommentsOnly/index.js
index fd670809e2cf..1de4ea56b3aa 100644
--- a/src/components/AnchorForCommentsOnly/index.js
+++ b/src/components/AnchorForCommentsOnly/index.js
@@ -1,4 +1,5 @@
import React from 'react';
+import {View} from 'react-native';
import * as anchorForCommentsOnlyPropTypes from './anchorForCommentsOnlyPropTypes';
import BaseAnchorForCommentsOnly from './BaseAnchorForCommentsOnly';
import * as DeviceCapabilities from '../../libs/DeviceCapabilities';
@@ -6,17 +7,14 @@ import ControlSelection from '../../libs/ControlSelection';
import styles from '../../styles/styles';
const AnchorForCommentsOnly = (props) => (
- DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
- onPressOut={() => ControlSelection.unblock()}
- // HTML renderer root view display is flex. Using flex will force all child elements
- // to be block elements even when they have display inline added to them.
- // This will affect elements like which are inline by default.
- // Setting display block to the container view will solve that.
- containerStyles={[styles.dBlock]}
- />
+
+ DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
+ onPressOut={() => ControlSelection.unblock()}
+ />
+
);
AnchorForCommentsOnly.propTypes = anchorForCommentsOnlyPropTypes.propTypes;