What causes PopupMenu to close when you alt tab away from the app?

What causes PopupMenu to close when you alt tab away from the app? I’m trying to make a component that replicates most of the behaviour of popup menus.

if you place a debug breakpoint in juce_PopupMenu.cpp on the MenuWindow::dismissMenu() function, you can get the stack trace. Something to do with a Timer in MouseState…

Note: this is on a Mac with Command-tab…