When I click Add comment in everywhere on Stack Exchange you can't hide the box opened. I myself changed my decision to post a comment in site.

Don't you think there need to be a cancel link in place to close the box? Isn't it a usability issue?

It bothers me when I can't close the comment box.

  • 1
    Since it's an inline form I don't see much use for one; at a glance Twitter, Youtube and Facebook lack a "comment" cancel button, though Google Plus includes one.
    – Ben Brocka
    Jul 13 '12 at 11:44

No, you don't need a cancel button

When you're clicking the "Add comment" button, you're not doing anything. You haven't posted a comment yet, so there is nothing to revert.

An undo facility is useful when a user performs an action which has some serious effects. For example, removing an email from your inbox must have an undo, since you may be interested in getting the email back if you hit the button by mistake. If in a large application, like Photoshop, you click on a button which changes the whole layout of your toolbars, windows, etc., then undoing it would be a great feature.

On the other hand, the fact that the comment area is displayed is not something critically important.

If you are removing a part of a page, that may be important enough to include an undo. For example, if there were a button hiding the right panel (tags, related, community bulletin, etc.) in order to enlarge the middle one (question and answers), it would be a good idea to be able to revert this, because you would like to have the ability to get back to the full view. But you are not getting anything more in terms of features by hiding the Add comment form.

Yes, you need a cancel button

For a few people, having a form you don't want to fill is annoying. Not that it wastes space (on a large display, does it really matter?), but it constantly indicates that you, as the user, made a mistake by clicking on the wrong button, or that you had an idea of a comment but meanwhile understood that it was stupid.

This behavior is not very user friendly, and there must be a way to hide the form.


Personally, I understand completely why developers of Stack Exchange decided to not include the undo. A feature like this means more code that you have to test and maintain, and less code is always better. Since the feature would be useful only to a few users, the choice seems reasonable.

Moreover, where would you put the undo element? Just below "Add comment"? What if the user misses the "Add comment" button and clicks on "Cancel" instead? It must probably be appearing as a link, on the right of "help", but in this case, the person could click on "cancel" instead of "help", which would be annoying too.

Escape key would be another way to implement the undo feature, but at a risk, for the user, of clicking on this key by mistake while typing the comment.


I understand the confusion. This site is using "Add Comment" textlink and "Add Comment" button for two different functions

The "Add Comment" text link is just a toggle that unhides the textarea and the button. You still have to click the "Add comment" button to post a text.

Your confusion comes from the fact that when you hit the "Add Comment" text link, the site simply removes the toggle function altogether. This is certainly not a common behavior. When people toggle something, they expect to be able to go in both directions. But this is not what happens on Stackexchange.

Ultimately, more accurate description for the text link would've been "Show Comment Area". And when user clicks on it, it toggles to "Hide Comment Area". But I can also see why that's not exactly useful, because most users with an intent to add a comment would never hide-back the comment area.

Another way to think is, if the comment box were shown at all time, the Cancel button wouldn't be necessary. But since the site creator chose to hide the comment box by default, it's natural for people to expect bi-directional toggle action when they click on the "Add Comment" text link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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