1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #13824 from Snuffleupagus/issue-13823

When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823)
This commit is contained in:
Tim van der Meij 2021-07-30 22:48:38 +02:00 committed by GitHub
commit 10a1db6980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View file

@ -1193,6 +1193,12 @@ class WidgetAnnotation extends Annotation {
});
data.defaultFieldValue = this._decodeFormValue(defaultFieldValue);
// When no "V" entry exists, let the fieldValue fallback to the "DV" entry
// (fixes issue13823.pdf).
if (fieldValue === undefined && data.defaultFieldValue !== null) {
data.fieldValue = data.defaultFieldValue;
}
data.alternativeText = stringToPDFString(dict.get("TU") || "");
const defaultAppearance =