From 0b36d02aa1948cac2d8c4a7eb4d5ffabe5c6075a Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Thu, 6 Jan 2022 13:54:42 +0100 Subject: [PATCH] Fixed prefilled consume page initialization (fixes #1716) --- changelog/66_UNRELEASED_xxxx-xx-xx.md | 1 + public/viewjs/consume.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/66_UNRELEASED_xxxx-xx-xx.md b/changelog/66_UNRELEASED_xxxx-xx-xx.md index c4d9e610..56dceae2 100644 --- a/changelog/66_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/66_UNRELEASED_xxxx-xx-xx.md @@ -6,3 +6,4 @@ - Fixed that numeric and date-time sorting of table columns on the stock entries page did not work correctly (thanks @MasterofJOKers) - Fixed that the barcode lookup for the "Stock by-barcode" API endpoints was case sensitive - Fixed that the logout button/menu was missing when using external authentication (e.g. LDAP) +- Fixed that the consume page/dialog wasn't properly initialized when opening it from the stock entries page diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index 7f499e25..49f7f5b3 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -597,7 +597,6 @@ if (GetUriParam("embedded") !== undefined) if (typeof locationId === 'undefined') { Grocy.Components.ProductPicker.GetPicker().trigger('change'); - Grocy.Components.ProductPicker.GetInputElement().focus(); } else { @@ -605,6 +604,7 @@ if (GetUriParam("embedded") !== undefined) $("#location_id").trigger('change'); $("#use_specific_stock_entry").click(); $("#use_specific_stock_entry").trigger('change'); + Grocy.Components.ProductPicker.GetPicker().trigger('change'); } }