I have a form with some input fields and a hidden submit button (hidden using style = "display: none").
When you press the return key, when the input field is focused in Firefox, the form is submitted.
However, in Chrome, when you press return, nothing happens. I was wondering how to add this functionality in Chrome?
Here is the form, take a look at it in Chrome: http://jsfiddle.net/B59rV/2/
<form method="post" action="/xxxx" accept-charset="UTF-8"> <input type="hidden" value="SSjovFqEfRwz2vYDIsB6JRdtLAuXGmnT+tkyZnrtqEE=" name="authenticity_token"> <div class="input text_field"> <label>Email</label> <input type="text" size="30" name="user_session[email]" /> </div> <div class="input text_field"> <label>Password</label> <input type="password" size="30" name="user_session[password]" /> </div> <input type="submit" value="Sign In" style="display: none;" > </form>
source share