Beforeunload closes surface
Click Open Surface. The page pre-arms beforeunload while the fake modal is open. When Cmd+W triggers beforeunload, the handler synchronously closes the modal before the browser prompt.
Navigate awayFake active surface
This represents Settings, preview, dock item, or another closeable surface.