This is now the third time I have lost a whole posting, so I've finally figured it out. It used to be that when you clicked on a photo in preview mode (when doing a new posting), it would open the photo in a new window. It no longer does that. The photo opens in the same posting window. So if you close that window after viewing your photo, it closes the window where you're doing the posting and everything is gone. I hope I'm the only person who would even want to open a photo while doing a posting.
Would it be possible to go to history > "recently closed windows" (in Firefox; other web browsers may vary) and restore the window in a case like this?
YES. That works! I had no idea. Thanks, maf. When I tried it in the testbed, the attachment was still connected to it too. I think this situation doesn't happen in Advanced Edit, or maybe it's if doing a reply. I'm not certain - I know I've recently seen an attachment opened during entry opened in a separate tab, just not sure exactly where.