XFA - Remove the checked attribute from the checkbox when unchecked (bug 1729877)

- it aims to fix: https://bugzilla.mozilla.org/show_bug.cgi?id=1729877.
This commit is contained in:
Calixte Denizet 2021-09-09 12:39:10 +02:00
parent 8a79f13e5a
commit 623860bf8f
3 changed files with 20 additions and 0 deletions

View File

@ -37,6 +37,10 @@ class XfaLayer {
) { ) {
if (storedData.value === element.attributes.xfaOn) { if (storedData.value === element.attributes.xfaOn) {
html.setAttribute("checked", true); html.setAttribute("checked", true);
} else if (storedData.value === element.attributes.xfaOff) {
// The checked attribute may have been set when opening the file,
// unset through the UI and we're here because of printing.
html.removeAttribute("checked");
} }
if (intent === "print") { if (intent === "print") {
break; break;

View File

@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9240352

View File

@ -967,6 +967,21 @@
"enableXfa": true, "enableXfa": true,
"type": "eq" "type": "eq"
}, },
{ "id": "xfa_bug1729877",
"file": "pdfs/xfa_bug1729877.pdf",
"md5": "1bf5429ea13a090f52edcd49cb0c4a47",
"link": true,
"rounds": 1,
"enableXfa": true,
"type": "eq",
"lastPage": 1,
"print": true,
"annotationStorage": {
"jobReq13847": {
"value": "0"
}
}
},
{ "id": "xfa_bug1722038", { "id": "xfa_bug1722038",
"file": "pdfs/xfa_bug1722038.pdf", "file": "pdfs/xfa_bug1722038.pdf",
"md5": "95170baaade2ab6e1d0372f35db01747", "md5": "95170baaade2ab6e1d0372f35db01747",