From df3e7f7815563240c0d52829803cdcf32c7e3473 Mon Sep 17 00:00:00 2001 From: Stephan Rauh <3045767+stephanrauh@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:37:02 +0100 Subject: [PATCH] #1920 fixed the bug that every checkbox was initially checked in many PDF forms --- src/display/annotation_layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 90bb760341dcc7..fb878b92832f7c 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -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 });