No Code Attached Yet bug
avatar Harmageddon
Harmageddon
23 Jun 2020

Steps to reproduce the issue

  1. Download a full installation package and extract it.
  2. Navigate to the installation screen.
  3. Select the language and enter a site name.
  4. Press the "Enter" key on your keyboard.
  5. Enter your user details.
  6. Press the "Enter" key on your keyboard.
  7. Press the button "Setup Database Connection".
  8. Enter your database details.
  9. Press the "Enter" key on your keyboard.

Expected result

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.

Actual result

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.

System information (as much as possible)

Browser: Firefox 77.0
OS: Manjaro Linux

avatar Harmageddon Harmageddon - open - 23 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Jun 2020
avatar brianteeman
brianteeman - comment - 2 Jul 2020

I can not replicate this

avatar Harmageddon
Harmageddon - comment - 3 Jul 2020

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.

avatar brianteeman
brianteeman - comment - 21 Dec 2020

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.

avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 20 Feb 2023
avatar brianteeman
brianteeman - comment - 8 Nov 2026

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.

Add a Comment

Login with GitHub to post a comment