You were probably lucky - much more than a few seconds might well be too much for it.
My first ' phone expired through damp penetrating it and ruining the display, as well as any other damage that may have occurred. And that was from water soaking through clothing, not submersion.
None of them are waterproof. I have read over and over that if you do drop it in water and it doesn't work to immediately remove the battery and submerge them in dry rice.
I'd go further if the water is soapy or salty: but it's somewhat non-intuitive advice.
Remove the battery immediately, as you say; then rinse the opened device in distilled or de-ionised water thoroughly before drying it. It's still a gamble, and won't guarantee the phone has not been ruined anyway, but if merely dried the residual salts are likely to cause a lot of corrosion later as they absorb atmospheric moisture.