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:
parent
828398f60f
commit
62df96894d
3 changed files with 7 additions and 0 deletions
|
@ -93,9 +93,11 @@ describe("Signature Editor", () => {
|
||||||
);
|
);
|
||||||
expect(description).withContext(browserName).toEqual("");
|
expect(description).withContext(browserName).toEqual("");
|
||||||
await page.waitForSelector(`${addButtonSelector}:disabled`);
|
await page.waitForSelector(`${addButtonSelector}:disabled`);
|
||||||
|
await page.waitForSelector("#addSignatureDescInput:disabled");
|
||||||
|
|
||||||
await page.type("#addSignatureTypeInput", "PDF.js");
|
await page.type("#addSignatureTypeInput", "PDF.js");
|
||||||
await page.waitForSelector(`${addButtonSelector}:not(:disabled)`);
|
await page.waitForSelector(`${addButtonSelector}:not(:disabled)`);
|
||||||
|
await page.waitForSelector("#addSignatureDescInput:not(:disabled)");
|
||||||
|
|
||||||
// The save button should be enabled now.
|
// The save button should be enabled now.
|
||||||
await page.waitForSelector(
|
await page.waitForSelector(
|
||||||
|
|
|
@ -521,6 +521,10 @@
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
|
|
||||||
|
&:has(input:disabled) > label {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
> label {
|
> label {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,6 +325,7 @@ class SignatureManager {
|
||||||
this.#saveCheckbox.disabled =
|
this.#saveCheckbox.disabled =
|
||||||
this.#clearButton.disabled =
|
this.#clearButton.disabled =
|
||||||
this.#addButton.disabled =
|
this.#addButton.disabled =
|
||||||
|
this.#description.disabled =
|
||||||
!value;
|
!value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue