fix: clear input field on scan error, version 0.18.3 - Fixes #1
This commit is contained in:
2
app.py
2
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
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user