bhl-forms 0.0.20 → 0.0.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.
@@ -10703,10 +10703,12 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
10703
10703
  if (!stepResult) {
10704
10704
  return;
10705
10705
  }
10706
- if (formNode.id && isMobile) {
10707
- const form2 = document.getElementById(formNode.id);
10708
- if (form2)
10709
- form2.scrollIntoView(true);
10706
+ const anchorId = formNode.attrs.anchorElement || formNode.id;
10707
+ if (anchorId && isMobile) {
10708
+ const anchor = document.getElementById(anchorId);
10709
+ if (anchor) {
10710
+ anchor.scrollIntoView(true);
10711
+ }
10710
10712
  }
10711
10713
  const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
10712
10714
  if (typeof window._analytics !== "undefined") {