As in normal forms, hitting Enter will submit the form, in case of this multi-step form, the next "submit" button (respectively the button leading to the next page) should be clicked, when hitting Enter inside a form field.
The field "Enter the real name of your Super User." is focused when hitting enter. This happens on the user details step, but also in subsequent steps, which is even more confusing.
Browser: Firefox 77.0
OS: Manjaro Linux
| Labels |
Added:
?
|
||
Just tested with beta2 and the current nightly, and the issue still exists for me, both in Firefox and Chromium. Maybe my test instructions are imprecise at some point?
When I have focus on the last input field (for example the admin mail address field), entered a value and then press the Enter key while the field is still focused (not tabbing to the submit button), the focus goes back to the admin name field.
Sorry I see what you mean now. Not that I personally have ever used the enter key to move to the next field - I didn't even know it was a thing. It seems very wrong to me that pressing enter does that. The enter should be just for submitting a form and the tab for moving to the next field.
| Labels |
Added:
No Code Attached Yet
bug
Removed: ? |
||
I have investigated this and believe the problem is caused by the way the installer handles its multi-step form.
All four steps are contained within a single HTML form. The buttons used to move between the steps do not explicitly declare a type attribute. Since a button inside a form defaults to type="submit", pressing Enter in an input implicitly submits the form using the first submit button, which is the button for Step 1. This explains the unexpected behaviour: pressing Enter in Step 2 takes the user back to the first step's handler, and pressing Enter in Step 3 can cause multiple steps to become visible at the same time.
There is also a question of expected behaviour. Pressing Enter in a form field should submit the form; it should not simply move focus to the next field. Moving between fields should be handled by Tab, not Enter.
The buttons used to navigate between the installation steps should therefore explicitly have type="button", rather than relying on the default button behaviour.
However, making that change means the buttons will no longer trigger form submission automatically. The JavaScript in setup.js will consequently need to handle the Enter key and trigger the appropriate button for the currently active step. That way, Enter in Step 1 advances to Step 2, Enter in Step 2 advances to Step 3, and Enter in Step 3 triggers the database validation and installation process.
This should address the inconsistent behaviour while making the form's keyboard interaction more predictable.
I can not replicate this