1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

Merge pull request #19320 from nicolo-ribaudo/stamp-double-click

Enable editor when double-clicking on stamp annotation
This commit is contained in:
Jonas Jenwald 2025-01-14 12:02:30 +01:00 committed by GitHub
commit 016de74229
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 1 deletions

View file

@ -1814,4 +1814,35 @@ describe("Stamp Editor", () => {
);
});
});
describe("Switch to edit mode by double clicking on an existing stamp annotation", () => {
const annotationSelector = getAnnotationSelector("999R");
let pages;
beforeAll(async () => {
pages = await loadAndWait("issue19239.pdf", annotationSelector);
});
afterAll(async () => {
await closePages(pages);
});
it("must switch to edit mode", async () => {
await Promise.all(
pages.map(async ([, page]) => {
await page.waitForSelector(annotationSelector);
await scrollIntoView(page, annotationSelector);
await page.click(annotationSelector, { count: 2 });
await page.waitForFunction(() =>
document
.querySelector(".annotationEditorLayer")
.classList.contains("stampEditing")
);
})
);
});
});
});