Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

If I add a comment but navigate (by mistake) to another page, I lose my unfinished comment (ok, depends on browser etc). On the other hand, when formulating a question, and I click on a link by mistake, I'm asked if I really want to leave.

It would be nice to have this warning for comments as well.

share|improve this question
Happened to me again just now, I find this quite annoying. – newenglander Apr 17 '13 at 16:27
I'm not that sure, if this depends on browsers. I've been using few of them and non of them saves comment edit field's contents upon accidental navigation. – trejder Dec 18 '13 at 9:21
@trejder: you're right, I remember Opera being particularly good at this. – newenglander Dec 18 '13 at 14:05
up vote 7 down vote accepted

This has been declined several times 1 2 3 4 with two related arguments:

  • Comments have little content so little is lost, anything significant should be an edit or an answer instead.
  • Comments are not important, so the system shouldn't make them easier to use.

The problem with this argument is that they apply to chatty comments, but that's not all that comments are about. I've been hit several times by this while composing moderation-related comments (both as a diamond moderator and as a user guiding other users). I try to give tailored guidance to users, so I might write a comment like this:

Welcome to Foo Bar Stack Exchange. This is a [questions and answers site](, not a discussion forum. We've found that [questions about … ]( invariably lead to extended discussion and exchanges of opinion rather than useful advice, which [does not fit in our Q&A format](, so I am voting to close this question. You're welcome to drop in to our [chat room](

*#*(\&\@\T#\%\&\^#( accidentally left-clicked instead of middle-clicked to find the link to the chat room.

Now I can retype this. Or I can just cast a close vote and not offer any guidance.

There are comments with real content, that take several minutes to write. Not all comments are trivial, and these non-trivial comments are the most important ones. Making comments so easy to lose is an incentive to not leaving any constructive guidance — leave a form comment or none at all. It would make sense if the system was geared against form comments, but it's actually geared towards them since specific comments are so brittle to compose.

Please arrange for the system not to hinder constructive comments. Either save the unfinished comment somewhere and recall it on page load, or arrange for the browser to do that (it should work both when clicking on a link and when closing the tab — I wrote this answer after accidentally closing the wrong tab while composing a comment a bit like the one above). Or alternatively display a confirmation warning when navigating out of the page.

I prefer saving and restoring the comment to a navigation warning, because transparent save/restore is seamless and isn't in my way if I just decide to abandon the page. Ideally the comment would be saved on the server side so I can start composing a comment on one machine and finish it on another, but that would be icing on the cake. I can see the advantage to a navigation warning as well — it alerts me that I might have forgotten to send a comment, and if I want to cancel that comment, it's very easy to delete the text from the entry box. But either way, don't make me lose work because of one misclick during normal workflow.

share|improve this answer

Take matters into your own hands with this simple userscript. It saves unsent comments when you leave a page, and restores them when you come back, using HTML5 localStorage. Tested on Chrome and Firefox.

share|improve this answer
If you can see this, then the userscript works. Thank you! – Gilles Jul 4 '14 at 11:34
I've posted that comment (“If you can see this…”), but its draft still appears when I pull up this page. Let's see what happens if I post a new comment… <edit> No, every time I reopen this page, the “If you can see this…” comment draft reappears. I can edit the draft to something different, but if I make the edit box blank, the last saved draft reappears. – Gilles Jul 7 '14 at 18:45
@Gilles Hmm, it should clear when you submit, but I may have missed something. I'll check the gist tonight. – fredley Jul 7 '14 at 18:55

Comments are meant to be transitory. Unlike posts, where you might actually put significant effort into writing the text, comments are designed to be throwaway.

That's why there's a warning for posts, but not for comments.

share|improve this answer
Ok, still find it annoying, but I understand that point of view. – newenglander Jul 22 '11 at 17:54
Although on the other hand, comments can have 600 characters and basic formatting. If they were as short as twitter messages and without any formatting, then I could understand this better. – newenglander May 11 '12 at 8:06
Implementing feature of saving unposted comments (drafts) in cookies and restoring them back (similarly to saving and restoring drafts of uposted question or answer) doesn't seems to be a hard work for dev team and would ease users life really much. So, pity, but I find your decision on not implementing this, like: "We're The Dev Team, we say: no saving to comments, so shut up! If you don't like it, go find yourself a better website". This is, another pity, example how creators of famous website doesn't care for users opinion at all. Feel free to correct me, if I'm wrong. – trejder Dec 18 '13 at 9:27
@trejder: luckily there are tools like Greasemonkey and sites like No one has made a warning-upon-leaving-page-with-unsubmitted-comments script so far (as far as I can see), but it wouldn't be too hard. – newenglander Dec 18 '13 at 14:07
If you were going to post some links in your comment, you could have lost 10 minutes of your research. – Neolisk Jan 6 '14 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .