bhl-forms 0.0.51 → 0.0.52

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.
@@ -10490,14 +10490,14 @@ function useSteps() {
10490
10490
  if (autoFocus) {
10491
10491
  var newNode = steps2[activeStep2.value].node;
10492
10492
  var firstInput = findFirstInput(newNode);
10493
- if (!firstInput) {
10494
- return;
10495
- }
10496
- if (autoFocusTypes.indexOf(firstInput.context.type) === -1) {
10497
- return;
10493
+ if (firstInput && autoFocusTypes.indexOf(firstInput.context.type) > -1) {
10494
+ var elem = document.getElementById(firstInput.context.id);
10495
+ try {
10496
+ focusAndOpenKeyboard(elem);
10497
+ } catch (e2) {
10498
+ console.warn("Failed to autoFocus:", e2);
10499
+ }
10498
10500
  }
10499
- var elem = document.getElementById(firstInput.context.id);
10500
- focusAndOpenKeyboard(elem);
10501
10501
  }
10502
10502
  return true;
10503
10503
  };
@@ -17889,6 +17889,7 @@ var scrollAnchor = (formNode) => () => {
17889
17889
  var anchor = document.getElementById(anchorId);
17890
17890
  if (anchor) {
17891
17891
  var pos = getCoords(anchor);
17892
+ dbg("scrollTo", pos);
17892
17893
  window.scrollTo(pos.right, pos.top);
17893
17894
  }
17894
17895
  }