@hubsync/esign-web-sdk 6.9.29 → 6.9.31

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.
@@ -502,7 +502,14 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
502
502
  // TODO: Remove legacy type when no longer needed
503
503
  case 'textarea':
504
504
  case 'textbox':
505
- return this.saveFieldChange(field.name, value, false);
505
+ return this.saveFieldChange(field.name, value, false).then(() => {
506
+ // Advance to the next unfilled field once a value is actually entered, matching the
507
+ // signature/initial/date behavior. Guard on a non-empty value so a stray focusout on an
508
+ // empty/cleared field (e.g. tabbing through or skipping) doesn't yank focus away.
509
+ if (value) {
510
+ this.focusNextFieldAfter(field);
511
+ }
512
+ });
506
513
  case 'checkbox': {
507
514
  return this.saveFieldChange(field.name, String(e.target.checked), false);
508
515
  }
@@ -512,7 +519,14 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
512
519
  case 'dropdown':
513
520
  // TODO: Set prepared to false server-side.
514
521
  console.log('Saving dropdown', field.name, e.detail);
515
- return this.saveFieldChange(field.name, e.detail, false);
522
+ return this.saveFieldChange(field.name, e.detail, false).then(() => {
523
+ // Advance to the next unfilled field once a selection is made, matching the
524
+ // signature/initial/date/textbox behavior. Guard on a value so clearing the
525
+ // selection doesn't yank focus away.
526
+ if (e.detail) {
527
+ this.focusNextFieldAfter(field);
528
+ }
529
+ });
516
530
  case 'initial':
517
531
  // This can be caused by a focus-out event if the user clicks the field
518
532
  // after it's already filled in, then clicks something else like a textbox.