Merge pull request #19320 from nicolo-ribaudo/stamp-double-click
Enable editor when double-clicking on stamp annotation
This commit is contained in:
commit
016de74229
@ -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")
|
||||
);
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -108,7 +108,6 @@
|
||||
white-space: nowrap;
|
||||
font: 10px sans-serif;
|
||||
line-height: 1.35;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +117,7 @@
|
||||
pointer-events: auto;
|
||||
box-sizing: border-box;
|
||||
transform-origin: 0 0;
|
||||
user-select: none;
|
||||
|
||||
&:has(div.annotationContent) {
|
||||
canvas.annotationContent {
|
||||
@ -315,6 +315,7 @@
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
pointer-events: auto;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.popupAnnotation.focused .popup {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user