mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Use one noContextMenu
function in both the src/- and web/-folders
Currently we duplicate this event handler function in multiple places, which seems unnecessary.
This commit is contained in:
parent
a09b7228fb
commit
1df31c0284
7 changed files with 20 additions and 32 deletions
|
@ -19,10 +19,9 @@ import {
|
|||
DEFAULT_SCALE_VALUE,
|
||||
MAX_SCALE,
|
||||
MIN_SCALE,
|
||||
noContextMenuHandler,
|
||||
toggleCheckedBtn,
|
||||
} from "./ui_utils.js";
|
||||
import { AnnotationEditorType } from "pdfjs-lib";
|
||||
import { AnnotationEditorType, noContextMenu } from "pdfjs-lib";
|
||||
|
||||
const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading";
|
||||
|
||||
|
@ -201,7 +200,7 @@ class Toolbar {
|
|||
}
|
||||
});
|
||||
// Suppress context menus for some controls.
|
||||
scaleSelect.oncontextmenu = noContextMenuHandler;
|
||||
scaleSelect.oncontextmenu = noContextMenu;
|
||||
|
||||
this.eventBus._on("localized", () => {
|
||||
this.#wasLocalized = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue