diff --git a/changelog/49_2.4.2_xxxx-xx-xx.md b/changelog/49_2.4.2_xxxx-xx-xx.md index 7dde9b6f..e06b2103 100644 --- a/changelog/49_2.4.2_xxxx-xx-xx.md +++ b/changelog/49_2.4.2_xxxx-xx-xx.md @@ -2,6 +2,7 @@ - Fixed a problem that the user settings were not properly initialized for the frontend JS part when not logged only (so potentially affected only the login page) - Fixed an issue that the shopping list did not load when a plural translation for a quantity unit was missing - Fixed that tooltips were visible forever when consuming all products on the stock overview page -- Fixed that login did not work when "Stay logged in permanently" was set on grocy runs on a 32-bit system +- Fixed that login did not work when "Stay logged in permanently" was set on grocy runs on a 32-bit system (thanks @matejdro) +- Fixed page reloads when "Auto reload on external changes" is enabled and there is unsaved form data (the detection did not work on forms in modal dialogs, e. g. when adding a entry to the meal plan) - Improved that errors/messages from the API are shown properly when undoing a stock booking is not possible (stock journal page) - Improved night mode CSS (done by @BlizzWave, thanks!) diff --git a/public/js/grocy.js b/public/js/grocy.js index 296cb403..c87747b0 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -374,11 +374,11 @@ Grocy.FrontendHelpers.ShowGenericError = function(message, exception) console.error(exception); } -$("form").on("keyup paste", "input, textarea", function() +$(document).on("keyup paste change", "input, textarea", function() { $(this).closest("form").addClass("is-dirty"); }); -$("form").on("click", "select", function() +$(document).on("click", "select", function() { $(this).closest("form").addClass("is-dirty"); });