This question already has an answer here:
- Add comment, leave page, lose comment 3 answers
It would be very nice if Ctrl+W while writing a comment would trigger the same confirmation dialog as it does for questions & answers:
This page is asking you to confirm that you want to leave - data you have entered may not be saved.
Very often, in the middle of writing a long comment I press CtrlW, thinking I'm in vim or the shell or somewhere and attempting to delete the last word; but in Firefox, this closes the current tab instead, and everything I've written so far is lost without any prompt which would have been shown if I were writing a post.
Using "Undo close tab" is also ineffective, since the comment box does not exist in page's HTML and is only added after clicking the "Add comment" link; meaning, Firefox doesn't have anywhere to restore my text to.