Install the Menu Wizard addon and then remove the menu point File->Exit as well as File->Close Window and then go to keyboard shortcut settings and also disable the direct shortcuts for them, which are, for some idiotic reason that a dev should receive 100 lashes for, SHIFT+CTRL+Q and SHIFT+CTRL+W, meaning every single time you want to write a capital Q or W and your finger accidentally happens to hit CTRL with SHIFT (which, duh!, are next to each other), the browser closes and you can lose any text you just typed. I'm not sure whether session restore does realtime backups to recover from this, but as you will know, Spectrum is a web app and a construction site with no autosaving yet. So while I already had removed the menu point for Exit and assumed that was the culprit, I just figured out you have to be more thorough, via losing a lot of typed text I'm definitely not gonna type again.