What would happen if you opened a Bag of Holding underwater?

I’m in a naval campaign where some of the game could take place underwater, and I could reasonably acquire a Bag of Holding soon, so it would be nice to know before I try to grab an item underwater and jettison all of my gear into the Astral plane. Would it fill with water until the bag was filled to capacity and scatter all the contents inside as well?

Also assuming you didn’t break the Bag of Holding by overfilling it to capacity, would putting water inside it get other objects inside wet, potentially ruining them?