From f6e6d7a8341c8107fe41bcfc5ad77c3ecf1c0281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Thu, 16 May 2024 13:17:40 +0200 Subject: [PATCH] fix(login): Prevent submitting the login form multiple times MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- core/src/components/login/LoginForm.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index 33cc8833564..c08c5172581 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -274,7 +274,13 @@ export default { updateUsername() { this.$emit('update:username', this.user) }, - submit() { + submit(event) { + if (this.loading) { + // Prevent the form from being submitted twice + event.preventDefault() + return + } + this.loading = true this.$emit('submit') },