Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

After AFORM-2810 was implemented multi step forms are always scrolled into focus on page load


We have a fairly long page with a form about half way down. This form was recently changed to use multiple steps which caused the form to always be focused on page load.

I hadn't seen this before so I tried downgrading to a previous version of forms and a short bisect later I found that it seems to have been introduced in 5.6.0, most likely with the issue AFORM-2810.

This issue introduced a call to $("[data-f-datainput]", eStep).first().focus(); in navigateToStep which is called on page load. I'm guessing this side effect was missed while testing since it only happens if the form is not in the viewport when the page loads.

Even if the page is in the viewport on load this focus stealing behaviour is bad since someone navigating primarily with the keyboard will miss out on everything that is above the form.

Edited, Dec 01, 2023 12:59

Could be worth reopening this issue with Optimizely Support to see if they can fix from there end.

Just to check, this recent article covered a similar issue with multi step forms not working properly 

If possible, try and replicate the issue on an Alloy Demo site and see if the issue exists on there

Edited, Dec 02, 2023 16:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.