It should close any open windows (inventory, skills, etc) first before opening the game menu. Quite annoying as it is a convention most games honor.

Also switching chars via Fx key should also switch view in inventory/skill window if it is open.