Skip to content

Commit

Permalink
Merge pull request #31465 from dukenv0307/fix/31377
Browse files Browse the repository at this point in the history
Prevent highlight when long pressing text link
  • Loading branch information
cristipaval authored Nov 17, 2023
2 parents f08baad + a1191f5 commit f168423
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
return (
<PressableWithSecondaryInteraction
inline
suppressHighlighting
style={[styles.cursorDefault, StyleUtils.getFontSizeStyle(style.fontSize)]}
onSecondaryInteraction={(event) => {
ReportActionContextMenu.showContextMenu(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const propTypes = {

/** Whether the view needs to be rendered offscreen (for Android only) */
needsOffscreenAlphaCompositing: PropTypes.bool,

/** Whether the text has a gray highlights on press down (for IOS only) */
suppressHighlighting: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -63,6 +66,7 @@ const defaultProps = {
activeOpacity: 1,
enableLongPressWithHover: false,
needsOffscreenAlphaCompositing: false,
suppressHighlighting: false,
};

export {propTypes, defaultProps};

0 comments on commit f168423

Please sign in to comment.