Hitting enter at login page does not give expected result
When you login, enter your username, then enter your password, and hit enter, it doesn't submit. Perhaps do to a lack of a submit input element?
Possible solution: use onkeypress instead of an input to push the submission.
Possible solution: use onkeypress instead of an input to push the submission.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?
<script type="text/javascript">
function enterSubmit(e) {
var char;
if(e.which) {
char = e.which;
}
if(char == 13) {
document.forms[0].submit();
return false;
} else {
return true;
}
}
</script>
That should do the trick JS-wise, then, simply:
<input type="text" name="username" id="username" onkeypress="enterSubmit(event)" />
<input type="password" name="password" id="password" onkeypress="enterSubmit(event)" />
On further thought, the lack of a submit button wouldn't suppress the enter key being used. Perhaps something with jQuery?
I’m unconcerned
-
Inappropriate?A better way would be to use either a proper <input /> for the submit button, or to use a <button>. Both of these fire the submit event on the form, which is trivial to hook into if need be.
Either that, or with the current "button", have that fire the submit event on the form. -
It's not a button, it's a link with a background image. -
That's why I had it in quotation marks. :) -
True dat. Either way, I agree with this solution. It's just all around better. But if it's going to be a link and not a button or input, the javascript solution above should be deployed, imho.
Loading Profile...


