Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 993 Bytes

File metadata and controls

34 lines (23 loc) · 993 Bytes
layout post
title Disable the context menu in JavaScript PDF Viewer | Syncfusion
description Learn how to disable the context menu in the JavaScript PDF Viewer using the ContextMenuOption property.
platform document-processing
control PDF Viewer
documentation ug
domainurl

Disable the context menu in JavaScript PDF Viewer

Set ContextMenuOption to None to hide all context menu options. The default value is RightClick.

Example: Disable context menu

<button id='disable'>Disable ContextMenuOption</button>
// Disable ContextMenuOption
document.getElementById('disable').addEventListener('click', ()=> {
  viewer.contextMenuOption = 'None';
});

This hides the context menu and prevents right-click interactions in the viewer.

Sample: How to disable the context menu