From fd355e2028ce14c39e325557d300804dd3160d24 Mon Sep 17 00:00:00 2001 From: Pratik Chanda Date: Thu, 26 Jun 2025 20:41:59 +0530 Subject: [PATCH] social_auth: Fix keyboard navigation on accounts in oauth. This commit makes the accounts in oauth page navigable on `Tab`. Fixes:zulip#34724. Co-authored-by: Parasaran --- templates/zerver/social_auth_select_email.html | 4 ++-- web/src/portico/signup.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/templates/zerver/social_auth_select_email.html b/templates/zerver/social_auth_select_email.html index 88f8665ffe..46467176b1 100644 --- a/templates/zerver/social_auth_select_email.html +++ b/templates/zerver/social_auth_select_email.html @@ -13,7 +13,7 @@
-
+
{% if avatar_urls[primary_email] %} @@ -37,7 +37,7 @@
{% for email in verified_non_primary_emails %} -
+
{% if avatar_urls[email] %} diff --git a/web/src/portico/signup.ts b/web/src/portico/signup.ts index c45ead140f..c798e9e877 100644 --- a/web/src/portico/signup.ts +++ b/web/src/portico/signup.ts @@ -334,6 +334,13 @@ $(() => { $(e.target).hide(); }); + $("form.select-email-form").on("keydown", function (e) { + if (e.key === "Enter") { + e.preventDefault(); + $(this).trigger("submit"); + } + }); + $("#how-realm-creator-found-zulip select").on("change", function () { const elements = new Map([ ["other", "how-realm-creator-found-zulip-other"],