Whenever we add a comment there is this textarea box. OK the first thing that gets into my mind is that I can press the "Enter" key in a textarea box and it will give me a newline. If its a normal 1-line textbox, I will know that if I press the "Enter" key it's submit.

Do you think it is a wrong decision to use a textarea for the "add comments" feature?

  • Well, I'm not a UX guy, but the comments on SE sites are multi-line and the Enter button submits. Seems to work well for me. Commented Jun 3, 2011 at 5:24
  • 4
    @Ed S: I never realized that until you mentioned it. I think it's not good UI. Since it only has an "add comment" button, that would signify that the right way to send the comment is to click that button, not hit the enter key. If SE wants to design a dual sending mechanism correctly, they should take a tip from Facebook's private messaging system (read my answer below).
    – JoJo
    Commented Jun 3, 2011 at 5:35
  • 2
    @JoJo: yes, the enter = submit on SO comments has caught me by suprise a couple of times too often as well. Commented Jun 3, 2011 at 6:37
  • @Ed S. does it work well with you only because you've used it for a couple of weeks now, or does it work well with you for the first time you're using it?
    – Pacerier
    Commented Jun 3, 2011 at 15:48
  • @Pacerier: Hard to tell. I started using SO in the private beta (2+ years now), so that very well may be the case. I would be fine with using Tab+Enter to send as well, so I can see your point. Commented Jun 3, 2011 at 16:09

2 Answers 2


For the duration of my response, I shall refer to text input as a 1 line form input and textarea as a multi-line form input.


The textarea or text input themselves do not intrinsically determine if the message can be submitted with the enter key or not. Rather, it is the elements around the textarea or text input that signify its sending mechanism.


Here are a two examples that contradict your text input == enter and textarea == not enter theory:

Meebo instant messaging

Meebo uses a textarea, but has no send button. The only way to send a message is to hit enter. Since Meebo's design emulates a desktop instant messaging program, people expect the sending mechanism to follow the convention - hitting enter. IM applications require fast communication. Hitting enter is much faster than pointing at a submit button and clicking it.


Facebook private message

Facebook uses a 1-line text input, but doesn't require hitting enter to send the message. You can hit the reply button to send the message. The enter key sending mechanism can be turned on or off by using the checkbox next to the enter key icon. Some people may choose to turn off the enter-send because either the want the enter key to insert a line break or they don't want to accidentally send out an unrevised message. As these are personal messages to close friends, you don't want an inadvertent enter key to send out an unfinished message that could change the relationship.



The number of lines of the form input only suggest the average length you think your users should be typing. The number of lines do not convey its sending mechanism. You must design the elements around the form input to signify its sending mechanism. To actually decide on which sending mechanism to use, you need to judge how important the following factors are to your application:

  • Speed of communication: Applications that require very fast communcation, such as instant messaging, should use enter-send. Apps where people generally only send messages once every hour or so will not benefit greatly from enter-send.
  • Importance of the message: Is the message just some random shout-out to strangers? If enter-send were enabled, and the user accidentally hit enter, expecting a line break, but instead the message is sent out, it won't be a big deal. They'll learn from this mistake and send out another message correcting their previous one. If however, the message carries a lot of weight, using a send button would be better. You'd want the user to consciously review her words and then hit the send button. Examples include, private messages to friends, emails, and StackExchange answers.
  • Form: It's a convention that forms are submitted when you hit the enter key on any non-textarea form element. This gives power users a way to quickly send the form. If your commenting system is a full blown out form requiring name, email, and message, for example, allow hitting enter on the non-textarea fields to submit the whole form. This feature is actually built into HTML. Just set the action attribute on your <form> tag and it's all handled automatically for you. Of course, you should also include a send button on any form for novice users who don't know this enter shortcut.
  • Good analysis! +1
    – Rahul
    Commented Jun 3, 2011 at 8:33
  • yeah, the length of comment dictates what enter does. Commented Jun 3, 2011 at 13:08

I think that you should make the post button be directly after the textarea (or change the tabindex) so that the user can press Tab+Enter to post their message, like Gmail's compose form. You should also give visual notification that this is possible.

For example, in HTML:

<form action="addcomment.php" method="post">
    <div><textarea rows="20" cols="10" name="comment"></textarea></div>
    <div><input type="submit" value="Add Comment"></div>
    <div>Tip: Press Tab then Enter to quickly post</div>
  • this solution has too much words in my opinion
    – Pacerier
    Commented Jun 3, 2011 at 15:52
  • i mean "Tip: Press Tab then Enter to quickly post" is gonna reduce that usability somehow
    – Pacerier
    Commented Jun 4, 2011 at 13:05

Your Answer

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

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