Not the same as this, but probably even worse, it's undesired behavior: when your browser asks you if you want to close a window and you confirm by hitting Enter, that key hit also gets intercepted by StackOverflow which is the next window and the result of it may be, for example, a submitted comment. This happened a lot with me, and it's definitely not a double-Enter. Answering OK with the mouse is fine.
I think it's natural to lookup something in another browser window before you post your comment. And it's a bug anyway.
So far it happened a lot in Safari/OSX10.6 and to be honest I don't want to experiment in other browsers, as the result of it is a submitted comment. To reproduce:
- Open StackOverflow in Safari, go to some post
- Hit "add comment", start typing until you at least reach the minimum (15 chars, is it?)
- Open a new browser window, go to Google.com, search for something
- Close your browser with Google Search results: the latest version of Google Search makes at least Safari ask with a modal dialog box if you are sure about closing it, because Safari thinks you filled in a form and didn't submit it
- Hit Enter in response: the window with Google Search closes and your comment on SO gets submitted
Edit instead of doing Google Search you can as well open StackOverflow, start asking a question, then try to close the window: both StackOverflow and the browser ask you if you are sure about leaving the page.