mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 10:05:45 +00:00
Set focus to input after canceled product picker workflow
This commit is contained in:
parent
12a318c6f2
commit
f4226876c9
@ -215,6 +215,8 @@ $('#product_id_text_input').on('blur', function(e)
|
|||||||
{
|
{
|
||||||
Grocy.Components.ProductPicker.PopupOpen = false;
|
Grocy.Components.ProductPicker.PopupOpen = false;
|
||||||
Grocy.Components.ProductPicker.SetValue('');
|
Grocy.Components.ProductPicker.SetValue('');
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addnewproduct: {
|
addnewproduct: {
|
||||||
@ -270,6 +272,8 @@ $('#product_id_text_input').on('blur', function(e)
|
|||||||
{
|
{
|
||||||
toastr.warning(__t("Nothing was found for the given barcode"));
|
toastr.warning(__t("Nothing was found for the given barcode"));
|
||||||
Grocy.FrontendHelpers.EndUiBusy($("form").first().attr("id"));
|
Grocy.FrontendHelpers.EndUiBusy($("form").first().attr("id"));
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -332,6 +336,8 @@ $('#product_id_text_input').on('blur', function(e)
|
|||||||
{
|
{
|
||||||
Grocy.Components.ProductPicker.PopupOpen = false;
|
Grocy.Components.ProductPicker.PopupOpen = false;
|
||||||
Grocy.Components.ProductPicker.SetValue('');
|
Grocy.Components.ProductPicker.SetValue('');
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||||
|
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||||
},
|
},
|
||||||
size: 'large',
|
size: 'large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user