Skip to content

Commit

Permalink
Merge pull request #17782 from tienifr/fix/17487-report-context-menu-…
Browse files Browse the repository at this point in the history
…on-long-press-on-web
  • Loading branch information
francoisl authored Apr 24, 2023
2 parents 1135316 + 8e55e85 commit 641bc99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/ShowContextMenuContext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import * as ReportActionContextMenu from '../pages/home/report/ContextMenu/ReportActionContextMenu';
import * as ContextMenuActions from '../pages/home/report/ContextMenu/ContextMenuActions';
import * as DeviceCapabilities from '../libs/DeviceCapabilities';

const ShowContextMenuContext = React.createContext({
anchor: null,
Expand All @@ -21,6 +22,10 @@ ShowContextMenuContext.displayName = 'ShowContextMenuContext';
* @param {Function} checkIfContextMenuActive Callback to update context menu active state
*/
function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive) {
if (!DeviceCapabilities.canUseTouchScreen()) {
return;
}

ReportActionContextMenu.showContextMenu(
ContextMenuActions.CONTEXT_MENU_TYPES.REPORT_ACTION,
event,
Expand Down

0 comments on commit 641bc99

Please sign in to comment.