@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.
@@ -595,8 +595,11 @@ export class VerdocsSign {
595
595
  const requiredFields = fillableFields.filter(field => !!field.required);
596
596
  const allRequiredFieldsSubmitted = requiredFields.every(field => this.isFieldValidForRecipient(field, recipientFields));
597
597
  const visitedFieldNames = new Set([...this.visitedFieldNames, ...extraVisitedFieldNames]);
598
- const allFieldsVisited = fillableFields.every(field => visitedFieldNames.has(field.name));
599
- const canSubmit = allRequiredFieldsSubmitted && allFieldsVisited;
598
+ // 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
599
+ const allFieldsHandled = fillableFields.every(field => visitedFieldNames.has(field.name) ||
600
+ this.skippedOptionalFields.includes(field.name) ||
601
+ this.isFieldFilledForNav(field, recipientFields));
602
+ const canSubmit = allRequiredFieldsSubmitted && allFieldsHandled;
600
603
  if (canSubmit) {
601
604
  this.nextButtonLabel = 'Finish';
602
605
  if (!this.nextSubmits) {