As far as I can tell, there is no existing option to do this, and we've now had a couple requests for it, so I'll just copy what one of our moderators recently said...
"Is there a way to get an error message when you have typed all or part of a reply and you try and leave the page? Something like 'are you sure you want to leave this page?'. For example, I have started a reply in the past and gone to get a link to add without opening another browser by mistake...and of course lost my post. And I would bet that when people say that they typed a whole post and it 'disappeared' that they pushed the 'add reply' button instead of the 'submit reply' button."
Make sense? Doable?
Thanks for the consideration!