From 90f30db915ec8f611fa2fbedfb38e3e733eb0538 Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 12 Feb 2026 09:57:48 -0600 Subject: [PATCH] fix: clear input field on scan error, version 0.18.3 - Fixes #1 --- app.py | 2 +- modules/conssheets/templates/conssheets/scan_session.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 0c6476c..af4dcc3 100644 --- a/app.py +++ b/app.py @@ -28,7 +28,7 @@ app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=1) # 1. Define the version -APP_VERSION = '0.18.2' +APP_VERSION = '0.18.3' # 2. Inject it into all templates automatically @app.context_processor diff --git a/modules/conssheets/templates/conssheets/scan_session.html b/modules/conssheets/templates/conssheets/scan_session.html index 5bddb70..46d1ccd 100644 --- a/modules/conssheets/templates/conssheets/scan_session.html +++ b/modules/conssheets/templates/conssheets/scan_session.html @@ -311,7 +311,10 @@ function processSmartScan(barcode, confirm = false) { feedbackArea.style.border = '1px solid #dc3545'; feedbackText.style.color = '#dc3545'; feedbackText.textContent = data.message; - if(smartInput) smartInput.focus(); + if(smartInput) { + smartInput.value = ''; + smartInput.focus(); + } } }) .catch(err => {