title: Stop form submitting when clicking 'Go' on mobiles
body: <p>Is there a way to link a button to an input, so mobiles know what to do when you press <code>Next</code> or <code>Go</code> on the keyboard within a .NET context (i.e. Pressing 'Go' on an input fakes the click on the next button instead of submitting the form)?</p>
  
  <p>Let's talk code for a second. I have the following markup, where <code>injected-via-js</code> is injected via javascript into a large form (progressive enhancement).</p>
  
  <pre><code>&lt;form class="dotNET-form-wrapper"&gt;
      &lt;div class="injected-via-js"&gt;
          &lt;div&gt;
              &lt;span&gt;&amp;pound;&lt;/span&gt;
              &lt;input type="number" /&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;button&gt;accept&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- More form elements --&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>On most mobile browsers, when you change the value in the number input and press <code>Go</code> or <code>Enter</code> it fakes the button press (which in my case has an important event bound to it). However on some old Android devices pressing <code>Go</code> will submit the form instead, which is <strong>not</strong> what I want. To clarify: <strong>I want the <code>Go</code> button to fake the button press, not submit the form</strong>.</p>
  
  <p><strong>Note:</strong>
  .NET is only relevant to this question due to the fact that <strong>everything</strong> is wrapped in a form, meaning I cannot create a separate form around the input and button and highjack the new form's submit.</p>
  
  <p>I've made a JSBin where I was able to replicate this bug with an <code>Android 2.2</code> phone although I imagine it exists on other bad browsers as well. It works as expected on <code>iOS 6+</code> and <code>Android 2.3+</code>.</p>
  
  <p>Here's the demo page: <a href="http://jsbin.com/tebizoda/2" rel="nofollow">http://jsbin.com/tebizoda/2</a></p>
  
  <p>And here's the edit version: <a href="http://jsbin.com/tebizoda/2/edit" rel="nofollow">http://jsbin.com/tebizoda/2/edit</a></p>