Off-screen mandatory empty variables are not focused or scrolled to when "Submit"/"Order Now" button is clicked in Service Catalog.
The issue occurs on some of the variable types, namely:
Steps to Reproduce
- Create four variables of type "Single Line Text" on a test catalog item with the following details:
Name: Test1, Order: 100
Name: Test2, Order: 200
Name: Test3, Order: 300
Name: Test4, Order: 400 (Set Mandatory Checkbox to true).
- Open this test item in Service Catalog and resize the browser window such that Test4 variable is hidden (accessible via scrolling down) but "Order Now" / "Submit" button is visible. You can create more variables in order to make that mandatory variable hidden somehow.
- Click "Order Now" / "Submit" button and notice the browser window scrolls down to focus on the Test4 variable.
- Change the Test4 variable type to one of the mentioned types below, with mandatory as true:
Notice the browser does not scroll to focus in this cases.
This is the expected behavior. By design some fields types do auto-scroll to the empty mandatory variable, and some do not, such as HTML, Reference, and the others listed.
Related Problem: PRB1293127