From 50f8248af241c21c1b2ac5eddc4a082fbed04e8f Mon Sep 17 00:00:00 2001 From: Emilianouz <135679131+Emilianouz@users.noreply.github.com> Date: Sun, 8 Feb 2026 21:32:24 +0000 Subject: [PATCH] Fix event listener for login form submission in profile view. --- front-end/views/profile.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front-end/views/profile.mjs b/front-end/views/profile.mjs index dd2b92a..9916922 100644 --- a/front-end/views/profile.mjs +++ b/front-end/views/profile.mjs @@ -39,8 +39,8 @@ function profileView(username) { createLogin ); document - .querySelector("[data-action='login']") - ?.addEventListener("click", handleLogin); + .querySelector("[data-form='login']") // data action + ?.addEventListener("submit", handleLogin); // click const profileData = state.profiles.find((p) => p.username === username); if (profileData) {