@hubsync/esign-web-sdk 6.5.7 → 6.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -574,8 +574,11 @@ const VerdocsSign = class {
574
574
  const requiredFields = fillableFields.filter(field => !!field.required);
575
575
  const allRequiredFieldsSubmitted = requiredFields.every(field => this.isFieldValidForRecipient(field, recipientFields));
576
576
  const visitedFieldNames = new Set([...this.visitedFieldNames, ...extraVisitedFieldNames]);
577
- const allFieldsVisited = fillableFields.every(field => visitedFieldNames.has(field.name));
578
- const canSubmit = allRequiredFieldsSubmitted && allFieldsVisited;
577
+ // A field is considered "handled" if it's visited OR if it's an optional field that was skipped OR if it's already filled
578
+ const allFieldsHandled = fillableFields.every(field => visitedFieldNames.has(field.name) ||
579
+ this.skippedOptionalFields.includes(field.name) ||
580
+ this.isFieldFilledForNav(field, recipientFields));
581
+ const canSubmit = allRequiredFieldsSubmitted && allFieldsHandled;
579
582
  if (canSubmit) {
580
583
  this.nextButtonLabel = 'Finish';
581
584
  if (!this.nextSubmits) {