mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Optimized form input field navigation delay
This commit is contained in:
@@ -139,7 +139,7 @@ Grocy.Components.CameraBarcodeScanner.StartScanning = function()
|
||||
setTimeout(function()
|
||||
{
|
||||
$(".modal").last().modal("hide");
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -218,7 +218,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
},
|
||||
addnewproduct: {
|
||||
@@ -278,7 +278,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -379,7 +379,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
},
|
||||
function(xhr)
|
||||
@@ -416,7 +416,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
Grocy.Components.ProductPicker.GetInputElement().focusout();
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().blur();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
$(document).on("shown.bs.modal", function(e)
|
||||
|
@@ -121,5 +121,5 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
Grocy.Components.RecipePicker.GetInputElement().focusout();
|
||||
Grocy.Components.RecipePicker.GetInputElement().focus();
|
||||
Grocy.Components.RecipePicker.GetInputElement().blur();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
Reference in New Issue
Block a user