This is an automated email from the ASF dual-hosted git repository.
uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 965a1cd7f25 Fix login form (#48429)
965a1cd7f25 is described below
commit 965a1cd7f25867ce7430397d58249a0d05e77ebb
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Thu Mar 27 12:49:47 2025 +0800
Fix login form (#48429)
We don't want to form to actually submit, only its keyboard behavior.
The preventDefault() call makes things work.
---
.../api_fastapi/auth/managers/simple/ui/src/login/LoginForm.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/login/LoginForm.tsx
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/login/LoginForm.tsx
index 05df44410b3..39ba967d2c4 100644
---
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/login/LoginForm.tsx
+++
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/login/LoginForm.tsx
@@ -40,7 +40,10 @@ export const LoginForm = ({ onLogin, isPending }:
LoginFormProps) => {
});
return (
- <form onSubmit={() => void handleSubmit(onLogin)()}>
+ <form onSubmit={(e: React.SyntheticEvent) => {
+ e.preventDefault();
+ handleSubmit(onLogin)();
+ }}>
<Stack gap={4}>
<Controller
name="username"