mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed chore/battery camera barcode scanning blur event handling (fixes #1585)
This commit is contained in:
parent
8e552f1146
commit
7f70f0ec07
@ -6,4 +6,5 @@
|
||||
- Fixed that the "Stock by-barcode" API routes also accepted chore or battery grocycodes (thanks @lowlee)
|
||||
- Fixed that it was not possible to select a chore/battery on the corresponding tracking pages by mouse/touch
|
||||
- Fixed that grouping by columns in tables may caused duplicate groups
|
||||
- Fixed that grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking
|
||||
- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu)
|
||||
|
@ -105,7 +105,20 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
return;
|
||||
}
|
||||
|
||||
$('#battery_id_text_input').val(barcode).trigger('change');
|
||||
// Don't know why the blur event does not fire immediately ... this works...
|
||||
$("#battery_id_text_input").focusout();
|
||||
$("#battery_id_text_input").focus();
|
||||
$("#battery_id_text_input").blur();
|
||||
|
||||
$("#battery_id_text_input").val(barcode);
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#battery_id_text_input").focusout();
|
||||
$("#battery_id_text_input").focus();
|
||||
$("#battery_id_text_input").blur();
|
||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
function UndoChargeCycle(chargeCycleId)
|
||||
|
@ -121,7 +121,20 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
return;
|
||||
}
|
||||
|
||||
$('#chore_id_text_input').val(barcode).trigger('change');
|
||||
// Don't know why the blur event does not fire immediately ... this works...
|
||||
$("#chore_id_text_input").focusout();
|
||||
$("#chore_id_text_input").focus();
|
||||
$("#chore_id_text_input").blur();
|
||||
|
||||
$("#chore_id_text_input").val(barcode);
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#chore_id_text_input").focusout();
|
||||
$("#chore_id_text_input").focus();
|
||||
$("#chore_id_text_input").blur();
|
||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
Grocy.Components.DateTimePicker.GetInputElement().on('keypress', function(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user