From 02e2ab678dabaea521e107f17ffe3a9ea4b77e4e Mon Sep 17 00:00:00 2001 From: Ankur Date: Wed, 15 Jul 2026 13:01:24 +0530 Subject: [PATCH] fix: resolve input focus on entire input field --- frontend/registration.html | 15 +++++++++++++-- frontend/styles/main.css | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/frontend/registration.html b/frontend/registration.html index 9a66b44f..c746f7e4 100644 --- a/frontend/registration.html +++ b/frontend/registration.html @@ -36,7 +36,7 @@ - +
@@ -269,7 +269,18 @@

Join the Leaderboard

const form = document.getElementById("registrationForm"); form .querySelectorAll(".form-group") - .forEach((f) => (f.style.display = "block")); + .forEach((group) => { + group.style.display = "block" + const input = group.querySelector("input"); + if (!input) return; + group.addEventListener("mousedown", (e) => { + if (e.target !== input) { + e.preventDefault(); + input.focus(); + } + }) + }); + document.getElementById("registerBtn").style.display = "inline-block"; const execLog = document.getElementById("exec-log-box"); if (execLog) execLog.style.display = "none"; diff --git a/frontend/styles/main.css b/frontend/styles/main.css index da05b7db..e9cdc6c0 100644 --- a/frontend/styles/main.css +++ b/frontend/styles/main.css @@ -1132,6 +1132,8 @@ body.crt-scrolling { .form-group { margin-bottom: 1.5rem; + position: relative; + } .form-label { @@ -1150,11 +1152,15 @@ body.crt-scrolling { .form-input { width: 100%; + box-sizing: border-box; padding: 0.75rem 1rem; border-radius: 4px; border: 1px solid var(--border-bright); + position: relative; + z-index: 2; background: var(--bg); color: var(--green); + cursor: text; font-family: "Fira Code", monospace; font-size: 0.9rem; outline: none;