I was trying to keep fix as isolated as possible, but your comment made me think of a couple more cases that my original fix did not cover:
1. context menu in editor
2. recent project dropdown list

Note that shortcuts seem to be blocked when main menus are displayed. Not sure why that is or if we should instead block commands when context emnus are displayed.

`Menus.closeAll()` handles the first case but not the second, so I switched to handling event in PopUpManager.

The `beforeExecuteCommand` event gets triggered for all commands, so let me know if there are any commands where we do not want to close certain menus.