What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

On https://security.stackexchange.com/users/login page for a site where I don't yet have an account, if I select the "Log in using Stack Exchange" box, when I hit enter from the password form, nothing happens.

Minor, but...

share|improve this question
    
Well, it used to work. –  Shadow Wizard Mar 6 at 7:52
    
@ShadowWizard, yeah, I saw that, but it was an awful long time ago... –  Benjol Mar 6 at 8:07
    
True, the login page was redesigned recently so I hope it's a simple overlook on their side. –  Shadow Wizard Mar 6 at 8:19

2 Answers 2

This will be fixed in the next build. Hitting enter in the log in or signup forms will submit as expected.

share|improve this answer

I've added a client-side fix for this issue into the Stack Overflow Unofficial Patch v1.10.

Basically, the cause of the problem is that the "submit" button on the form is not really a normal <input type=submit> element, and so the auto-submit-on-enter feature in most browsers is not applied to the form. The fix is simply to emulate it with a custom keypress event handler in JavaScript, just like is done e.g. for the comment input boxes (which are really <textarea>s, and thus also don't auto-submit on enter):

var inputs = 'input[name=email], input[name=password]';

$('.login-page #se-login-form').on( 'keypress', inputs, function (e) {
    if ( e.which != 13 || e.shiftKey || e.defaultPrevented ) return;

    e.preventDefault();
    e.stopImmediatePropagation();

    var empty = $(e.delegateTarget).find(inputs).filter('[value=""]');
    if ( empty.length > 0 ) empty.first().focus();
    else $(e.delegateTarget).find('#submit-button').click();
} );

What this code does is trigger on Enter key presses in either of the e-mail / password input boxes, assuming that (just to be safe) no other event handler has stopped them or prevented their default behavior yet. It then checks if both of the fields are filled, and, if so, simulates a click on the submit button; otherwise, it transfers input focus to the first empty field.

share|improve this answer
    
...and now that it's fixed, this code has been removed from SOUP v1.12. –  Ilmari Karonen Apr 15 at 0:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .