mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
More initial form field focus optimizations
This commit is contained in:
@@ -357,7 +357,11 @@ Grocy.FrontendHelpers.ValidateForm('inventory-form');
|
||||
|
||||
if (Grocy.Components.ProductPicker.InAnyFlow() === false && GetUriParam("embedded") === undefined)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -365,7 +369,11 @@ else
|
||||
|
||||
if (Grocy.Components.ProductPicker.InProductModifyWorkflow())
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +381,11 @@ $('#display_amount').on('focus', function(e)
|
||||
{
|
||||
if (Grocy.Components.ProductPicker.GetValue().length === 0)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user