@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.
@@ -411,8 +411,10 @@ export class VerdocsSign {
411
411
  updateDocumentFieldValue(oldField);
412
412
  this.fieldUpdateCounter++;
413
413
  this.markEnvelopeStarted();
414
- // If a previously skipped field gets filled, remove it from the skipped list
415
- if (this.skippedFields.includes(fieldName)) {
414
+ // Only unmark as skipped when the field is actually filled with a real value.
415
+ // An empty-string save (e.g. focusout when navigating away from a skipped textbox)
416
+ // must not remove the field from skippedFields or the skip loop re-triggers.
417
+ if (this.skippedFields.includes(fieldName) && this.isFieldActuallyFilled(oldField)) {
416
418
  this.skippedFields = this.skippedFields.filter(n => n !== fieldName);
417
419
  }
418
420
  this.checkRecipientFields();
@@ -442,6 +444,12 @@ export class VerdocsSign {
442
444
  if (field === null || field === void 0 ? void 0 : field.readonly) {
443
445
  return Promise.resolve();
444
446
  }
447
+ // Don't persist focusout-triggered saves for skipped fields — navigating away from
448
+ // a skipped textbox fires focusout with an empty value which would cause a pointless
449
+ // API call and trigger the skip loop via updateRecipientFieldValue.
450
+ if (this.skippedFields.includes(fieldName)) {
451
+ return Promise.resolve();
452
+ }
445
453
  console.log('[SIGN] saveFieldChange', fieldName, { value, prepared });
446
454
  return updateEnvelopeField(this.endpoint, this.envelopeId, this.roleId, fieldName, value, prepared)
447
455
  .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))