From 6e0e00c7f339be727f0a2b16688913090201f042 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Mon, 4 Dec 2023 14:48:50 -0500 Subject: [PATCH] docs: comments for the event handling in login --- web/src/pages/login.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/pages/login.rs b/web/src/pages/login.rs index e44d376..9c2510c 100644 --- a/web/src/pages/login.rs +++ b/web/src/pages/login.rs @@ -31,7 +31,8 @@ pub fn LoginForm<'ctx, G: Html>(cx: Scope<'ctx>, sh: StateHandler<'ctx>) -> View info!("Attempting login request"); let (username, password) = ((*username.get_untracked()).clone(), (*password.get_untracked()).clone()); // NOTE(jwall): This is required if we want to keep the below auth request from - // failing to send with blocked by browser. + // failing to send with blocked by browser. This is because it's on a click and + // the form tries to do a submit event and aborts our network request. evt.prevent_default(); if username != "" && password != "" { spawn_local_scoped(cx, async move {