mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
fix initial state of checkboxes in display layer (#12904)
consider the export value when multiple checkboxes have the same name
This commit is contained in:
parent
d5cad9ad3f
commit
fc925827b2
3 changed files with 15 additions and 1 deletions
|
@ -874,7 +874,10 @@ class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
|
|||
const data = this.data;
|
||||
const id = data.id;
|
||||
const value = storage.getOrCreateValue(id, {
|
||||
value: data.fieldValue && data.fieldValue !== "Off",
|
||||
value:
|
||||
data.fieldValue &&
|
||||
((data.exportValue && data.exportValue === data.fieldValue) ||
|
||||
(!data.exportValue && data.fieldValue !== "Off")),
|
||||
}).value;
|
||||
|
||||
this.container.className = "buttonWidgetAnnotation checkBox";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue