Ignore the fieldValue for Signature annotations, since they're currently unsupported (issue 10374)

Given that Signature (Widget) annotations are currently not supported, since they cannot be validated, simply ignoring the `fieldValue` seems OK for now considering that attempting to blindly include unparsed/unvalidated data isn't very useful.

Fixes 10347.
This commit is contained in:
Jonas Jenwald 2018-12-12 11:04:41 +01:00
parent cad0e61262
commit 437fb8a8a7

View File

@ -613,8 +613,11 @@ class WidgetAnnotation extends Annotation {
data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY); data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY);
// Hide signatures because we cannot validate them. // Hide signatures because we cannot validate them, and unset the fieldValue
// since it's (most likely) a `Dict` which is non-serializable and will thus
// cause errors when sending annotations to the main-thread (issue 10347).
if (data.fieldType === 'Sig') { if (data.fieldType === 'Sig') {
data.fieldValue = null;
this.setFlags(AnnotationFlag.HIDDEN); this.setFlags(AnnotationFlag.HIDDEN);
} }
} }