Skip to content

Commit f168423

Browse files
authored
Merge pull request #31465 from dukenv0307/fix/31377
Prevent highlight when long pressing text link
2 parents f08baad + a1191f5 commit f168423

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
5656
return (
5757
<PressableWithSecondaryInteraction
5858
inline
59+
suppressHighlighting
5960
style={[styles.cursorDefault, StyleUtils.getFontSizeStyle(style.fontSize)]}
6061
onSecondaryInteraction={(event) => {
6162
ReportActionContextMenu.showContextMenu(

src/components/PressableWithSecondaryInteraction/pressableWithSecondaryInteractionPropTypes.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ const propTypes = {
5151

5252
/** Whether the view needs to be rendered offscreen (for Android only) */
5353
needsOffscreenAlphaCompositing: PropTypes.bool,
54+
55+
/** Whether the text has a gray highlights on press down (for IOS only) */
56+
suppressHighlighting: PropTypes.bool,
5457
};
5558

5659
const defaultProps = {
@@ -63,6 +66,7 @@ const defaultProps = {
6366
activeOpacity: 1,
6467
enableLongPressWithHover: false,
6568
needsOffscreenAlphaCompositing: false,
69+
suppressHighlighting: false,
6670
};
6771

6872
export {propTypes, defaultProps};

0 commit comments

Comments
 (0)