From 035b409775c1c0e650fcb5f4cff54618d88cdf65 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Fri, 24 Jun 2022 22:33:58 +0200
Subject: [PATCH] SUbmit form unconditionally after scanning

---
 aleksis/apps/paweljong/static/js/paweljong/checkpoint.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/aleksis/apps/paweljong/static/js/paweljong/checkpoint.js b/aleksis/apps/paweljong/static/js/paweljong/checkpoint.js
index c2d950a..d066e71 100644
--- a/aleksis/apps/paweljong/static/js/paweljong/checkpoint.js
+++ b/aleksis/apps/paweljong/static/js/paweljong/checkpoint.js
@@ -13,9 +13,7 @@ function setCheckpointCoords(position) {
 
 function onScanSuccess(decodedText, decodedResult) {
     $("[name='username']").val(decodedText);
-    if ($("[name='username']").is(":focus") && $("[name='comment']").val()) {
-        $("[name='username']").closest("form").submit();
-    }
+    $("[name='username']").closest("form").submit();
 }
 
 function onScanError(error) {
-- 
GitLab