Skip to content

Commit

Permalink
fix: Can't open the context menu on right click on mentions.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
  • Loading branch information
Krishna2323 committed Oct 18, 2023
1 parent 3fdc7f7 commit fdd7791
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Text from '../../Text';
import styles from '../../../styles/styles';
import * as ReportUtils from '../../../libs/ReportUtils';
import {ShowContextMenuContext, showContextMenuForReport} from '../../ShowContextMenuContext';
import PressableWithSecondaryInteraction from '../../PressableWithSecondaryInteraction';
import UserDetailsTooltip from '../../UserDetailsTooltip';
import htmlRendererPropTypes from './htmlRendererPropTypes';
import withCurrentUserPersonalDetails from '../../withCurrentUserPersonalDetails';
Expand Down Expand Up @@ -61,10 +60,9 @@ function MentionUserRenderer(props) {
return (
<ShowContextMenuContext.Consumer>
{({anchor, report, action, checkIfContextMenuActive}) => (
<PressableWithSecondaryInteraction
inline
<Text
suppressHighlighting
onSecondaryInteraction={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
onPress={(event) => {
event.preventDefault();
Navigation.navigate(navigationRoute);
Expand All @@ -89,7 +87,7 @@ function MentionUserRenderer(props) {
{!_.isEmpty(htmlAttribAccountID) ? `@${displayNameOrLogin}` : <TNodeChildrenRenderer tnode={props.tnode} />}
</Text>
</UserDetailsTooltip>
</PressableWithSecondaryInteraction>
</Text>
)}
</ShowContextMenuContext.Consumer>
);
Expand Down

0 comments on commit fdd7791

Please sign in to comment.