diff --git a/src/display/editor/tools.js b/src/display/editor/tools.js index e17b1bfb97775..e266ab18972d8 100644 --- a/src/display/editor/tools.js +++ b/src/display/editor/tools.js @@ -806,7 +806,6 @@ class AnnotationEditorUIManager { this.isShiftKeyDown = false; if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) { - window.uiManager = this; Object.defineProperty(this, "reset", { value: () => { this.selectAll(); diff --git a/test/integration/highlight_editor_spec.mjs b/test/integration/highlight_editor_spec.mjs index 5533d37a9c307..e793ec825b198 100644 --- a/test/integration/highlight_editor_spec.mjs +++ b/test/integration/highlight_editor_spec.mjs @@ -990,7 +990,13 @@ describe("Highlight Editor", () => { "tracemonkey.pdf", ".annotationEditorLayer", null, - null, + { + eventBusSetup: eventBus => { + eventBus.on("annotationeditoruimanager", ({ uiManager }) => { + window.uiManager = uiManager; + }); + }, + }, { highlightEditorColors: "red=#AB0000", supportsCaretBrowsingMode: true, diff --git a/test/integration/stamp_editor_spec.mjs b/test/integration/stamp_editor_spec.mjs index 9da7bdc4b38f8..c947d934003ad 100644 --- a/test/integration/stamp_editor_spec.mjs +++ b/test/integration/stamp_editor_spec.mjs @@ -832,7 +832,13 @@ describe("Stamp Editor", () => { "empty.pdf", ".annotationEditorLayer", null, - null, + { + eventBusSetup: eventBus => { + eventBus.on("annotationeditoruimanager", ({ uiManager }) => { + window.uiManager = uiManager; + }); + }, + }, { enableAltText: true, enableUpdatedAddImage: true,