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