Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

signup: Use e.key instead of deprecated e.which.

Priyank Patel607abc0b7712
diff --git a/static/js/portico/signup.js b/static/js/portico/signup.js
index e88fcc22560..c7dc764605c 100644
--- a/static/js/portico/signup.js
+++ b/static/js/portico/signup.js
@@ -155,8 +155,8 @@ $(() => {
"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) {
+ // the keycode was the one for "Enter".
+ if (e.type === "focusout" || e.key === "Enter") {
$(this).val($(this).val().trim());
}
},