diff --git a/changelog/81_UNRELEASED_xxxx-xx-xx.md b/changelog/81_UNRELEASED_xxxx-xx-xx.md index 80f8973d..71e60c45 100644 --- a/changelog/81_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/81_UNRELEASED_xxxx-xx-xx.md @@ -13,6 +13,7 @@ - Optimized the line plot markers color of the price history chart (product card) (thanks @DeepCoreSystem) - Fixed that German Umlauts were removed from product names when looking up a barcode via the built-in Open Food Facts external barcode lookup plugin - Fixed that when using/scanning a barcode on the purchase page with a note attached (which prefills the note field) and when manually selecting another product afterwards, the note of the previously used barcode was incorrectly prefilled again +- Fixed that the "next input focus handling" (jumping to the next input after entering a value) didn't work at some places (e.g. after entering a purchased date on the purchase page) ### Shopping list diff --git a/public/viewjs/components/datetimepicker.js b/public/viewjs/components/datetimepicker.js index 05df42a3..a5203801 100644 --- a/public/viewjs/components/datetimepicker.js +++ b/public/viewjs/components/datetimepicker.js @@ -139,6 +139,11 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keyup', function(e) var format = inputElement.data('format'); var nextInputElement = $(inputElement.data('next-input-selector')); + if (!nextInputElement.is("input")) + { + nextInputElement = nextInputElement.find("input"); + } + // If input is empty and any arrow key is pressed, set date to today if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39)) { diff --git a/public/viewjs/components/datetimepicker2.js b/public/viewjs/components/datetimepicker2.js index 6c2c4df4..c609aad4 100644 --- a/public/viewjs/components/datetimepicker2.js +++ b/public/viewjs/components/datetimepicker2.js @@ -139,6 +139,11 @@ Grocy.Components.DateTimePicker2.GetInputElement().on('keyup', function(e) var format = inputElement.data('format'); var nextInputElement = $(inputElement.data('next-input-selector')); + if (!nextInputElement.is("input")) + { + nextInputElement = nextInputElement.find("input"); + } + // If input is empty and any arrow key is pressed, set date to today if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39)) { diff --git a/views/components/datetimepicker2.blade.php b/views/components/datetimepicker2.blade.php index 6b770e8d..9a760316 100644 --- a/views/components/datetimepicker2.blade.php +++ b/views/components/datetimepicker2.blade.php @@ -69,22 +69,20 @@