Anyways, so the way to save the text when that happens, is to Not touch the tab your in, but to open a new tab and log in there. Then you go back to the tab you were writing in and hit "f5" (the re-load button) and ta-da! What you had just written, is now posted ;)
Maybe this is common knowledge, but at least I was not aware that you could do this until like 5 min ago XD So yeah... Also Im using Google Chrome as a Browser, not sure if it works differently in another one.