I've been making several "updating" buttons for web forms that I have -- basically, they're secure ways to edit server-side fields and then have the results displayed on a web form. It requires a reload, but that's the price you have to pay for security (and simplicity -- there's no need to bring out AJAX for this).
All the buttons really have is a little bit of formula code and a @Command([FileSave]) at the end -- like I said, simple stuff. The field is updated, the page reloads, and the user returns to the very same document, still in edit mode. No FileCloseWindow performed, nothing.
Well, the weirdness started when I added a bit more code after the initial FileSave (just a little bit of cleaning up of data) followed by another filesave -- guess what started to happen? The form started closing, just as if there was a FileCloseWindow in there. WTF, eh?
Took me a couple of tries, but I eventually removed the second FileSave and all was well. Beats me as to why this happens -- perhaps Domino interprets any two formula commands on the web to mean an implied FileCloseWindow?