Skip to content

Commit

Permalink
Merge pull request #25700 from s-alves10/fix/issue-21346
Browse files Browse the repository at this point in the history
Imitate web event in native image renderer
  • Loading branch information
youssef-lr authored Aug 26, 2023
2 parents 3ec41ac + 312b026 commit a8f0343
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,17 @@ function ImageRenderer(props) {
const route = ROUTES.getReportAttachmentRoute(report.reportID, source);
Navigation.navigate(route);
}}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
onLongPress={(event) =>
showContextMenuForReport(
// Imitate the web event for native renderers
{nativeEvent: {...(event.nativeEvent || {}), target: {tagName: 'IMG'}}},
anchor,
report.reportID,
action,
checkIfContextMenuActive,
ReportUtils.isArchivedRoom(report),
)
}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={props.translate('accessibilityHints.viewAttachment')}
>
Expand Down

0 comments on commit a8f0343

Please sign in to comment.