1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

[Editor] in the signature UI, disable the description input if there is no signature (bug 1956114)

This commit is contained in:
Calixte Denizet 2025-03-26 23:02:13 +01:00
parent 828398f60f
commit 62df96894d
3 changed files with 7 additions and 0 deletions

View file

@ -93,9 +93,11 @@ describe("Signature Editor", () => {
);
expect(description).withContext(browserName).toEqual("");
await page.waitForSelector(`${addButtonSelector}:disabled`);
await page.waitForSelector("#addSignatureDescInput:disabled");
await page.type("#addSignatureTypeInput", "PDF.js");
await page.waitForSelector(`${addButtonSelector}:not(:disabled)`);
await page.waitForSelector("#addSignatureDescInput:not(:disabled)");
// The save button should be enabled now.
await page.waitForSelector(

View file

@ -521,6 +521,10 @@
gap: 4px;
flex: 1 0 0;
&:has(input:disabled) > label {
opacity: 0.4;
}
> label {
width: auto;
}

View file

@ -325,6 +325,7 @@ class SignatureManager {
this.#saveCheckbox.disabled =
this.#clearButton.disabled =
this.#addButton.disabled =
this.#description.disabled =
!value;
}