7

I know that in general you can hit Enter while focused on a form field to submit a form. However certain elements like selects and textareas break this behavior. How come we don't have a web standard that permits the user to submit a form with the keyboard regardless of the type of element that's currently focused? (tabbing to the Submit button is not a reasonable general solution, it takes too much attention and time)

Incidentally, I noticed some sites (e.g. Asana, Gmail, GitHub) introduced Ctrl-Enter to reliably submit with the keyboard. Is there any effort to standardize this behavior in browsers through an RFC? This seems like a glaring hole in web forms.

3

3 Answers 3

1

It's not a glaring hole in web forms, it's just that web forms follow the UX of computer forms. Enter is, from the Windows Keyboard Shortcut guidelines, to:

Carry out the default command of the dialog box or command of the selected control.

You essentially want to have an extra control for the specific case when Enter is the command of the selected control.

From what I am aware of there has never been a convention to 'submit a form regardless of the input'.

Where as having a shortcut for when you might have to hit Tab 10+ times is worth it, typically you won't have forms with 10 dropdowns in a row.

The times when I have seen Ctrl + Enter as a shortcut is typically when you have a text area, e.g. when sending an email. But Ctrl + Enter is used as a shortcut is many instances e.g. in the address bar for Firefox Ctrl + Enter will convert example into www.example.com and go to the page, so it's definitely not a standard.

From what I can tell, the annoyance that you have isn't annoying enough to have a standard for it.

12
  • Windows made the standard for Windows forms. If it is good enough for 90% of the world, why not simply apply it to the Web as well? Are web forms somehow that different from a user standpoint that we cannot decide to use Enter to submit the form? How is the web different from Windows, in such a way that this is impossible?
    – user67695
    Feb 23, 2018 at 14:55
  • @nocomprende I think you're agreeing with me, but not sure?
    – icc97
    Feb 23, 2018 at 15:10
  • Your last sentence dismisses this as a problem, yet Windows thought it was enough of a problem to solve it. Since apps are moving from Windows to the web, shouldn't we keep the learning and improvements and solutions hard-won over decades? When billions of people are annoyed, even a tiny bit, the improvement of fixing a tiny thing is significant. But, it was already eliminated, so why does App 2.0 have that bug again? Are humans smart enough to learn from past mistakes, or not? If not, well, let's get on with the real work of butting our heads against walls instead of shooting the breeze here!
    – user67695
    Feb 23, 2018 at 16:10
  • 1
    @GabeKopley Three sites is a very bold claim to be 'de facto'. See the linked question for people who don't believe that Ctrl+Enter is any kind of standard.
    – icc97
    Feb 23, 2018 at 18:53
  • 1
    @GabeKopley Windows (+ Mac OS as well) matter because they defined most of the UX rules that are used. The web is an extension of the desktop.
    – icc97
    Feb 23, 2018 at 18:55
0

The reason for that is some users (bank cashiers for example) using keyboard only (for speed sake). When selecting an option from a select box, they need to press Enter to choose the selection. If the form would submit on Enter, this could cause to an error if Enter is accidentally pressed twice.

There are implementations, like onChange -> submit, but this is useful (not always) when your form only contains one element which is select.

6
  • 1
    I think the question is why isn't there some other key or key combination that would always result in the form submitting.
    – invot
    Feb 22, 2018 at 16:54
  • In this case I am flagging this as duplicate Feb 22, 2018 at 16:59
  • Please do not flag as duplicate. I am seeking why there's not a web standard for submitting a form with the keyboard not how to submit a form with the keyboard. Feb 22, 2018 at 17:34
  • @GabeKopley, sorry but it looks like you are looking for upvotes rather than the answer. Your question is similar to "why are there still diesel cars".. Feb 23, 2018 at 9:59
  • 1
    No, it is more like: "Why are all cars not electric"? They have existed for 100 years, and if they are better, why aren't we standardizing on them? If a standard way to submit a form would be better, why have we not gone with it yet? But this is similar to "why are humans human". Because... oh nevermind
    – user67695
    Feb 23, 2018 at 14:53
0

I think just nobody has taken the initiative to propose a standard. I'll do so here: Ctrl-Enter should be the standard and browser vendors should build it in.

1
  • Downvoters, please say why this is unfavorable. My thinking is if Google found it useful in Gmail, and the community thought a universal keyboard-based form submission method would be helpful, Google would add it to Chrome, and other browsers would follow. I'd love to know why this is a bad idea so that I can give up on my effort to shed light on this issue. Thanks! For example, are you concerned with breaking backwards-compatibility? Do you believe this is not useful-enough functionality to get its own key combo? Or some other reason you are against it? Feb 26, 2018 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.