title: Enter key not to submit - how to return false
body: <p>I want Enter Key not to submit a form. I did this first.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  $("#send_c").keypress(function(e) {
      if (e.which == 13) {
        e.preventDefault();
        return false;
      }
    });</code></pre>
  </div>
  </div>
  </p>
  
  <p>But the button and Enter key work the same. Nothing happens or submitted even by the Enter key. My second try is this.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;%=form_for [@article, @article.comments.build], remote: true, :onsubmit=&gt;"return false;" do |f| %&gt;
    &lt;%=f.text_field :body, id: "c_i"%&gt;
    &lt;%=f.button :submit, id: "send_c"%&gt;
  &lt;%end%&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This did not work. The form is submitted both by Enter key and submit button.</p>
  
  <p>What could be wrong?</p>