Merge pull request #20955 from calixteman/bug2025247

Remove the selection after the pages have been extracted (bug 2025247)
This commit is contained in:
Tim van der Meij 2026-03-24 21:24:51 +01:00 committed by GitHub
commit 2bcf2bb911
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -1890,6 +1890,9 @@ describe("Reorganize Pages View", () => {
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
await waitForThumbnailVisible(page, 1); await waitForThumbnailVisible(page, 1);
const labelSelector = "#viewsManagerStatusActionLabel";
await waitForTextToBe(page, labelSelector, "Select pages");
await waitAndClick( await waitAndClick(
page, page,
`.thumbnail:has(${getThumbnailSelector(1)}) input` `.thumbnail:has(${getThumbnailSelector(1)}) input`
@ -1899,6 +1902,8 @@ describe("Reorganize Pages View", () => {
`.thumbnail:has(${getThumbnailSelector(3)}) input` `.thumbnail:has(${getThumbnailSelector(3)}) input`
); );
await waitForTextToBe(page, labelSelector, `${FSI}2${PDI} selected`);
const handleExport = await createPromise(page, resolve => { const handleExport = await createPromise(page, resolve => {
window.PDFViewerApplication.eventBus.on( window.PDFViewerApplication.eventBus.on(
"saveextractedpages", "saveextractedpages",
@ -1919,6 +1924,13 @@ describe("Reorganize Pages View", () => {
.toEqual([ .toEqual([
{ document: null, pageIndices: [0, 1], includePages: [0, 2] }, { document: null, pageIndices: [0, 1], includePages: [0, 2] },
]); ]);
await waitForTextToBe(page, labelSelector, "Select pages");
// All checkboxes should be unchecked.
await page.waitForSelector(
"#thumbnailsView:not(:has(input:checked))",
{ visible: true }
);
}) })
); );
}); });

View File

@ -844,6 +844,7 @@ class PDFThumbnailViewer {
}); });
this.#clearSelection(); this.#clearSelection();
this.#toggleMenuEntries(false); this.#toggleMenuEntries(false);
this.#updateStatus("select");
} }
#copyPages(clearSelection = true) { #copyPages(clearSelection = true) {