You can right click any cosmetic part of the container window to close it. The actual inventory section does not respond to right clicks, probably because right clicking equipment in your inventory will equip it (so either right clicking is disabled to avoid closing the window on miss-clicks, or they just have not added feature yet when right clicking on empty inventory slots).

You can get easily get a line of 4 chests open at the same time (that is how many are in the barracks), and with telekinesis you can also open containers from farther away. Containers don't close until you get a bit more than a couple times the characters' height from them. You'll run out of screen space long before you get to a point where you can not open all the containers you care to collect.