HTML: Why does Android browser show "Go" instead of "Next" in keyboard? HTML: Why does Android browser show "Go" instead of "Next" in keyboard? android android

HTML: Why does Android browser show "Go" instead of "Next" in keyboard?


To add to John's answer, Android always adds 'Go' to text inputs and always adds 'Next' to number inputs. I'd love to hear the person responsible for this choice explain their logic.

The softkeyboard design is just lousy in this respect, because every user I've tested with so far has thought the big blue button in the keyboard must be the button that takes you to the next form field and then at the last form field lets you submit the form.

iOS it's even worse in this respect, since they offer a 'Go' button with every form field and no way to tab through the fields. It's nice that Apple likes to make computers simple for people, but sometimes assuming that people like it simple can shade into presuming people are all idiots.

Sorry about that rant. I do have something constructive to offer:

If your last form field happens to be type=number, then there is a tiny hack that will work on Android as well as iOS: add an invisible text input to the form with onfocus="$('#thisForm').submit();". In Android this field will briefly flash into view: in iOS it wont. To make the Android situation more palatable, you can either set a value for the text input like "Closing this form", or you can set its width to 0, which will cause the form field to be not quite 0 width but still very small.

Horrible hack, but hey, blame it on the UI people at Google and Apple.


The Android Browser always displays Go for input fields because some forms on the web (especially search boxes) have no submit button, and can only be activated by pressing Enter (Go is equivalent to Enter).

Instead some versions of Android will show a tab key in the bottom right of the keyboard to facilitate navigating between form fields.

I don't think you can prevent either of these behaviours.

Two possible workarounds:

  1. Use JavaScript to ignore submission of the login form until both inputs are non-blank:

    <form name="loginForm" onsubmit="return document.loginForm.user.value != '' && document.loginForm.pass.value != ''">    <input type="text" name="user">    <input type="password" name="pass">    <input type="submit" value="Login"></form>
  2. The cleanest solution would be to set both inputs to be required using the new HTML5 required attribute - but the Android Browser doesn't support this yet. However a good approach would be to supplement the required attribute with a JavaScript fallback such as that described by CSSKarma.


This is the Chromium issue if you want to watch it: https://bugs.chromium.org/p/chromium/issues/detail?id=410785

Here is a workaround for Android that changes the "enter" in the user input so that it "tabs" to the password field (and doesn't submit the form):

http://jsbin.com/zakeza/1/quiet

<form action="?">  User <input type=text onkeypress=key(event)><br><br>  Password <input id=pw type=password><br><br>  <input type=submit></form><script>  function key(event) {    if (event.charCode == 13 && /Android/.test(navigator.userAgent)) {      event.preventDefault();      document.getElementById('pw').focus();    }  }</script>

Edit: Note Windows Phone also puts Android into the UA, so needs testing that works on Windows Phone (and Android Firefox).