How to prevent grabbing items from a closed inventory?

Your interaction needs to check the closed state before doing anything.