From dd21139405a19e36040fafe379eebb36379ab8f4 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 15 Jun 2023 21:10:40 +0200 Subject: [PATCH] Disable events on canvas in the annotation layer --- test/integration/annotation_spec.js | 28 ++++++++++++++++++++++++++++ web/annotation_layer_builder.css | 1 + 2 files changed, 29 insertions(+) diff --git a/test/integration/annotation_spec.js b/test/integration/annotation_spec.js index 118e1c7f7..97cea0a52 100644 --- a/test/integration/annotation_spec.js +++ b/test/integration/annotation_spec.js @@ -403,4 +403,32 @@ describe("ResetForm action", () => { ); }); }); + + describe("FreeText widget", () => { + describe("issue14438.pdf", () => { + let pages; + + beforeAll(async () => { + pages = await loadAndWait( + "issue14438.pdf", + "[data-annotation-id='10R']" + ); + }); + + afterAll(async () => { + await closePages(pages); + }); + + it("must check that the annotation has a popup", async () => { + await Promise.all( + pages.map(async ([browserName, page]) => { + await page.click("[data-annotation-id='10R']"); + await page.waitForFunction( + `document.querySelector("[data-annotation-id='10R'] .popupWrapper").hidden !== undefined` + ); + }) + ); + }); + }); + }); }); diff --git a/web/annotation_layer_builder.css b/web/annotation_layer_builder.css index e365e8c0b..2bfec4965 100644 --- a/web/annotation_layer_builder.css +++ b/web/annotation_layer_builder.css @@ -67,6 +67,7 @@ position: absolute; width: 100%; height: 100%; + pointer-events: none; } .annotationLayer section {