diff --git a/src/display/editor/highlight.js b/src/display/editor/highlight.js index 0706ba867..86626a62c 100644 --- a/src/display/editor/highlight.js +++ b/src/display/editor/highlight.js @@ -984,6 +984,7 @@ class HighlightEditor extends AnnotationEditor { clipPathId, }); editor.#addToDrawLayer(); + editor.rotate(editor.parentRotation); } return editor; diff --git a/test/integration/highlight_editor_spec.mjs b/test/integration/highlight_editor_spec.mjs index f9d4199c2..e99db2c81 100644 --- a/test/integration/highlight_editor_spec.mjs +++ b/test/integration/highlight_editor_spec.mjs @@ -2674,4 +2674,34 @@ describe("Highlight Editor", () => { ); }); }); + + describe("Highlight must be rotated when existing in the pdf", () => { + let pages; + + beforeAll(async () => { + pages = await loadAndWait("issue19424.pdf", ".annotationEditorLayer"); + }); + + afterAll(async () => { + await closePages(pages); + }); + + it("must check that there is no scroll because of focus", async () => { + await Promise.all( + pages.map(async ([browserName, page]) => { + await page.evaluate(() => { + window.PDFViewerApplication.rotatePages(90); + }); + await page.waitForSelector( + ".annotationEditorLayer[data-main-rotation='90']" + ); + await switchToHighlight(page); + + await page.waitForSelector( + ".canvasWrapper svg[data-main-rotation='90']" + ); + }) + ); + }); + }); }); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index ce4ad6084..8714e1756 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -713,3 +713,4 @@ !colors.pdf !red_stamp.pdf !issue19633.pdf +!issue19424.pdf diff --git a/test/pdfs/issue19424.pdf b/test/pdfs/issue19424.pdf new file mode 100755 index 000000000..4a6257422 Binary files /dev/null and b/test/pdfs/issue19424.pdf differ