If you just walk away from an open container it should close automatically (though that isn't necessarily appropriate in all situations)... In Divine Divinity and Beyond Divinity right clicking would close windows in general, and for Divinity 2 right clicking container windows acted as 'take all and close'.