Skip to content

Commit

Permalink
Merge pull request #14869 from calixteman/14862
Browse files Browse the repository at this point in the history
[JS] Fix few bugs present in the pdf for issue #14862
  • Loading branch information
Snuffleupagus authored May 3, 2022
2 parents da4f7df + 6b866a5 commit 8135d7c
Show file tree
Hide file tree
Showing 14 changed files with 565 additions and 212 deletions.
5 changes: 3 additions & 2 deletions src/core/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,8 @@ class WidgetAnnotation extends Annotation {
const storageEntry = annotationStorage
? annotationStorage.get(this.data.id)
: undefined;
let value = storageEntry && storageEntry.value;
let value =
storageEntry && (storageEntry.formattedValue || storageEntry.value);
if (value === undefined) {
if (!this._hasValueFromXFA || this.appearance) {
// The annotation hasn't been rendered so use the appearance.
Expand Down Expand Up @@ -1981,7 +1982,7 @@ class TextWidgetAnnotation extends WidgetAnnotation {
return {
id: this.data.id,
value: this.data.fieldValue,
defaultValue: this.data.defaultFieldValue,
defaultValue: this.data.defaultFieldValue || "",
multiline: this.data.multiLine,
password: this.hasFieldFlag(AnnotationFieldFlag.PASSWORD),
charLimit: this.data.maxLen,
Expand Down
Loading

0 comments on commit 8135d7c

Please sign in to comment.