Show Next Error does not work in tabbed layout with AutoComplete
When there are multiple errors on a page, Show Next Error is displayed. Clicking Show Next Error should set the focus on first input containing the error and allow the user to click through to the next error field. Instead, sometimes it highlights no field or skips a field. If a user clicks an input, Show Next Error starts working again.
Steps to Reproduce
- In a Section, add an AutoComplete control, source it to a Declare Page, and always make it required.
- Select a Property that belongs to the Declare Page for searching and set the same property to a Property of Work class.
- Add a Text Input and refer to the Work class property of Step 2. Also make it required.
- In another Section, drag a Layout Group of type Default/Tab.
- Drag a Dynamic Layout in the Layout Group and refer to the Section created in Step 1.
- Refer to the Section created in Step 4 in a flow and run the flow to create the case.
- In a new case, click Submit to keep both fields untouched and blank. The form generates the Show Next Error button because multiple errors are present.
- Click Show Next Error and see that the focus gets stuck on the AutoComplete control.
Show Next Error and Error functionality does not work as expected in tabbed layout groups where AutoComplete is present. Show Next Error does not focus on the correct element when users click the Show Next Error button. This happens because Show Next Error focuses on the element whose CSS property display is set to None.