Clarify how the Enter key should behave in forms
Question
When inside a form (for example, the New Milestone or New Label page), should pressing Enter inside an <input>
element implicitly submit the form?
This is the browser's default behavior, so many users will expect this. However, we implement this inconsistently in existing forms:
-
New Label page (
/-/labels/new
): pressing Enter inside an<input>
submits the form -
New Milestone page (
/-/milestones/new
): pressing Enter inside an<input>
does not submit the form
Further details
Many of our forms implement a keyboard shortcut called "quick submit" which allows the form to be submitted using ⌘+Enter (or Ctrl+Enter):
Action items
Let's make a decision on this question and update https://design.gitlab.com/components/forms/ with the recommendation.