mirror of https://github.com/zulip/zulip.git
portico-signup: Strip whitespace from email fields.
This strips out whitespace from the email fields on the register and login screens. Fixes: #6578.
This commit is contained in:
parent
9187acfb8c
commit
e3917b7d63
|
@ -60,4 +60,12 @@ $(function () {
|
||||||
errorClass: "text-error",
|
errorClass: "text-error",
|
||||||
wrapper: "div",
|
wrapper: "div",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".register-page #email, .login-page-container #id_username").on('focusout keydown', function (e) {
|
||||||
|
// check if it is the "focusout" or if it is a keydown, then check if
|
||||||
|
// the keycode was the one for "enter" (13).
|
||||||
|
if (e.type === "focusout" || e.which === 13) {
|
||||||
|
$(this).val($.trim($(this).val()));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue