I recently had a project where I wanted to stop the “Go” button on the Android and iOS popup keyboard from submitting a form on my web application. Why would anyone want to do this? In my case, I wanted to prevent accidental form submission (or “butt-dialing”) on my app. I had implemented a “swipe-to-save” feature, but the “Go” button was bypassing this and submitting the form without requiring the swipe! After a lot of research and experimentation, I believe I have a solution that works! I’ve tested it on iOS and Android (on HTC One). Please let me know if it doesn’t work on your device!
Here it the code, which uses jQuery (your code might use “$” instead of “jQuery”):
var code = (e.keyCode ? e.keyCode : e.which);
if ( (code==13) || (code==10))