diff --git a/public/viewjs/shoppinglistitemform.js b/public/viewjs/shoppinglistitemform.js index db10c28a..0994f929 100644 --- a/public/viewjs/shoppinglistitemform.js +++ b/public/viewjs/shoppinglistitemform.js @@ -214,10 +214,6 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e) }); Grocy.FrontendHelpers.ValidateForm('shoppinglist-form'); -setTimeout(function() -{ - Grocy.Components.ProductPicker.GetInputElement().focus(); -}, 250); if (Grocy.EditMode === "edit") { @@ -278,7 +274,10 @@ if (GetUriParam("embedded") !== undefined) } else { - Grocy.Components.ProductPicker.GetInputElement().focus(); + setTimeout(function() + { + Grocy.Components.ProductPicker.GetInputElement().focus(); + }, 250); } }