From 842b376cd6b8a82fbb235ca605f2d84c9d0622cc Mon Sep 17 00:00:00 2001 From: Jamal Laqdiem Date: Sun, 18 Oct 2026 09:34:35 +0100 Subject: [PATCH] fix: attach submit listener to login form in profile view. --- front-end/views/profile.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/front-end/views/profile.mjs b/front-end/views/profile.mjs index dd2b92af..9e27a515 100644 --- a/front-end/views/profile.mjs +++ b/front-end/views/profile.mjs @@ -42,6 +42,14 @@ function profileView(username) { .querySelector("[data-action='login']") ?.addEventListener("click", handleLogin); + // Attach submit listener to the login form + const loginForm = + getLoginContainer().querySelector("form") || + document.querySelector("#login-form"); + if (loginForm) { + loginForm.addEventListener("submit", handleLogin); + } + const profileData = state.profiles.find((p) => p.username === username); if (profileData) { renderOne(