Skip to content

Commit

Permalink
mozilla#1920 fixed the bug that every checkbox was initially checked …
Browse files Browse the repository at this point in the history
…in many PDF forms
  • Loading branch information
stephanrauh committed Nov 22, 2023
1 parent 562fe11 commit df3e7f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
: formValue;
// #1737, #1887 end of modification by ngx-extended-pdf-viewer
let updateAngularValueNecessary = false;
if (typeof value === "string" || angularData !== formValue) {
if (typeof value === "string" || (!!angularData?.value && angularData?.value !== formValue)) {
// The value has been changed through js and set in annotationStorage.
value = value !== "Off";
storage.setValue(id, { value });
Expand Down

0 comments on commit df3e7f7

Please sign in to comment.