@hubsync/esign-web-sdk 6.9.20 → 6.9.21

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.
@@ -386,8 +386,10 @@ const VerdocsSign = class {
386
386
  updateDocumentFieldValue(oldField);
387
387
  this.fieldUpdateCounter++;
388
388
  this.markEnvelopeStarted();
389
- // If a previously skipped field gets filled, remove it from the skipped list
390
- if (this.skippedFields.includes(fieldName)) {
389
+ // Only unmark as skipped when the field is actually filled with a real value.
390
+ // An empty-string save (e.g. focusout when navigating away from a skipped textbox)
391
+ // must not remove the field from skippedFields or the skip loop re-triggers.
392
+ if (this.skippedFields.includes(fieldName) && this.isFieldActuallyFilled(oldField)) {
391
393
  this.skippedFields = this.skippedFields.filter(n => n !== fieldName);
392
394
  }
393
395
  this.checkRecipientFields();
@@ -417,6 +419,12 @@ const VerdocsSign = class {
417
419
  if (field === null || field === void 0 ? void 0 : field.readonly) {
418
420
  return Promise.resolve();
419
421
  }
422
+ // Don't persist focusout-triggered saves for skipped fields — navigating away from
423
+ // a skipped textbox fires focusout with an empty value which would cause a pointless
424
+ // API call and trigger the skip loop via updateRecipientFieldValue.
425
+ if (this.skippedFields.includes(fieldName)) {
426
+ return Promise.resolve();
427
+ }
420
428
  console.log('[SIGN] saveFieldChange', fieldName, { value, prepared });
421
429
  return updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, fieldName, value, prepared)
422
430
  .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))