Skip to content

Commit

Permalink
Merge pull request #13992 from calixteman/1729877
Browse files Browse the repository at this point in the history
XFA - Remove the checked attribute from the checkbox when unchecked (bug 1729877)
  • Loading branch information
calixteman authored Sep 9, 2021
2 parents 8a79f13 + 623860b commit d4caa87
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/display/xfa_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class XfaLayer {
) {
if (storedData.value === element.attributes.xfaOn) {
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") {
break;
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/xfa_bug1729877.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9240352
15 changes: 15 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,21 @@
"enableXfa": true,
"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",
"file": "pdfs/xfa_bug1722038.pdf",
"md5": "95170baaade2ab6e1d0372f35db01747",
Expand Down

0 comments on commit d4caa87

Please sign in to comment.