Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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