Auto selects amount of ingredient when adding new ingredient.

This commit is contained in:
MaxJa4
2022-02-28 19:43:37 +01:00
parent 089e634d69
commit 429d381f63
2 changed files with 3 additions and 2 deletions

View File

@@ -802,7 +802,7 @@ export default {
no_amount: false,
})
this.sortIngredients(step)
this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).focus())
this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).select())
},
removeIngredient: function (step, ingredient) {
if (confirm(this.$t("confirm_delete", { object: this.$t("Ingredient") }))) {