From 2f3797db343bbbe081b809c6a2618c4bdc1e3dfc Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Mon, 23 Oct 2023 22:11:30 +0200 Subject: [PATCH] [Annotation] Use the field V entry when there is no Parent one for a radio button (bug 1860602) --- src/core/annotation.js | 2 +- test/pdfs/bug1860602.pdf.link | 2 ++ test/test_manifest.json | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/pdfs/bug1860602.pdf.link diff --git a/src/core/annotation.js b/src/core/annotation.js index e6e01dc06..d1516a71a 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -3196,7 +3196,7 @@ class ButtonWidgetAnnotation extends WidgetAnnotation { } _processRadioButton(params) { - this.data.fieldValue = this.data.buttonValue = null; + this.data.buttonValue = null; // The parent field's `V` entry holds a `Name` object with the appearance // state of whichever child field is currently in the "on" state. diff --git a/test/pdfs/bug1860602.pdf.link b/test/pdfs/bug1860602.pdf.link new file mode 100644 index 000000000..228bce299 --- /dev/null +++ b/test/pdfs/bug1860602.pdf.link @@ -0,0 +1,2 @@ +https://bugzilla.mozilla.org/attachment.cgi?id=9359849 + diff --git a/test/test_manifest.json b/test/test_manifest.json index 6a2a5a2a3..f58ffb1ed 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -8170,5 +8170,16 @@ "rounds": 1, "type": "eq", "annotations": true + }, + { + "id": "bug1860602", + "file": "pdfs/bug1860602.pdf", + "md5": "37de2fbd0a02c5a3ca27c6e75fea8932", + "rounds": 1, + "link": true, + "firstPage": 2, + "lastPage": 2, + "type": "eq", + "forms": true } ]