The first thing you need to worry about is the moisture itself, once it completely dries, it may work. Next, the water may have minerals or contaminants in it that could "gum" things up. As mentioned by Carnage X, you also have to worry about corrosion.
I recently spilled a full cup of diet soda on my Surface Pro 4 keyboard. I dried it best that I could then tried it. At first, it was completely dead. After a few hours, it started working but some of the keys didn't work and the track pad started doing funky things with the mouse pointer. The following day it worked fine. Only time will tell if something in the soda will eventually cause corrosion and the keyboard will have problems again but, for the time being, it works fine.