diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 5ecac4947..185074794 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -185,8 +185,8 @@ class AnnotationElement { } } - static _hasPopupData({ titleObj, contentsObj, richText }) { - return !!(titleObj?.str || contentsObj?.str || richText?.str); + static _hasPopupData({ contentsObj, richText }) { + return !!(contentsObj?.str || richText?.str); } get _isEditable() { diff --git a/test/integration/annotation_spec.mjs b/test/integration/annotation_spec.mjs index 3193a91de..7db5284d2 100644 --- a/test/integration/annotation_spec.mjs +++ b/test/integration/annotation_spec.mjs @@ -664,7 +664,7 @@ describe("ResetForm action", () => { }); describe("Rotated annotation and its clickable area", () => { - describe("issue14438.pdf", () => { + describe("rotated_ink.pdf", () => { let pages; beforeEach(async () => { diff --git a/test/integration/freetext_editor_spec.mjs b/test/integration/freetext_editor_spec.mjs index 342fc41d3..fd58378ee 100644 --- a/test/integration/freetext_editor_spec.mjs +++ b/test/integration/freetext_editor_spec.mjs @@ -27,7 +27,6 @@ import { getFirstSerialized, getRect, getSerialized, - hover, isCanvasMonochrome, kbBigMoveDown, kbBigMoveLeft, @@ -1166,16 +1165,6 @@ describe("FreeText Editor", () => { await Promise.all( pages.map(async ([browserName, page]) => { await page.waitForSelector("[data-annotation-id='23R']"); - // Cannot use page.hover with Firefox on Mac because of a bug. - // TODO: remove this when we switch to BiDi. - await hover(page, "[data-annotation-id='23R']"); - - // Wait for the popup to be displayed. - await page.waitForFunction( - () => - document.querySelector("[data-annotation-id='popup_23R']") - .hidden === false - ); // Enter in editing mode. await switchToFreeText(page); @@ -1183,15 +1172,7 @@ describe("FreeText Editor", () => { // Disable editing mode. await switchToFreeText(page, /* disable = */ true); - // TODO: remove this when we switch to BiDi. - await hover(page, "[data-annotation-id='23R']"); - - // Wait for the popup to be displayed. - await page.waitForFunction( - () => - document.querySelector("[data-annotation-id='popup_23R']") - .hidden === false - ); + await page.waitForSelector("[data-annotation-id='23R']"); }) ); }); diff --git a/test/integration/test_utils.mjs b/test/integration/test_utils.mjs index e6752aff1..f3d949e6a 100644 --- a/test/integration/test_utils.mjs +++ b/test/integration/test_utils.mjs @@ -623,11 +623,6 @@ async function firstPageOnTop(page) { return awaitPromise(handle); } -async function hover(page, selector) { - const rect = await getRect(page, selector); - await page.mouse.move(rect.x + rect.width / 2, rect.y + rect.height / 2); -} - async function setCaretAt(page, pageNumber, text, position) { await page.evaluate( (pageN, string, pos) => { @@ -912,7 +907,6 @@ export { getSerialized, getSpanRectFromText, getXY, - hover, isCanvasMonochrome, kbBigMoveDown, kbBigMoveLeft, diff --git a/test/pdfs/rotated_ink.pdf b/test/pdfs/rotated_ink.pdf index 8b69361ea..0b7a99898 100644 Binary files a/test/pdfs/rotated_ink.pdf and b/test/pdfs/rotated_ink.pdf differ diff --git a/test/pdfs/tagged_stamp.pdf b/test/pdfs/tagged_stamp.pdf index 918fd5597..5666eb99b 100755 Binary files a/test/pdfs/tagged_stamp.pdf and b/test/pdfs/tagged_stamp.pdf differ