fix: ensure jquery tooltip is displayed correctly

Move jquery tooltip logic to the buildRecipeOperation function, so it
is called regardless of whether the recipe is loaded from the url
(which already worked correctly) or by dropping ingredients (which
wasn't working before)
This commit is contained in:
Bart van Andel 2025-04-06 01:29:52 +02:00
parent 9d9cced7c4
commit 7211906e0f

View file

@ -417,6 +417,8 @@ class RecipeWaiter {
el.classList.add("flow-control-op"); el.classList.add("flow-control-op");
} }
$(el).find("[data-toggle='tooltip']").tooltip();
// Disable auto-bake if this is a manual op // Disable auto-bake if this is a manual op
if (op.manualBake && this.app.autoBake_) { if (op.manualBake && this.app.autoBake_) {
this.manager.controls.setAutoBake(false); this.manager.controls.setAutoBake(false);
@ -442,8 +444,6 @@ class RecipeWaiter {
this.buildRecipeOperation(item); this.buildRecipeOperation(item);
document.getElementById("rec-list").appendChild(item); document.getElementById("rec-list").appendChild(item);
$(item).find("[data-toggle='tooltip']").tooltip();
item.dispatchEvent(this.manager.operationadd); item.dispatchEvent(this.manager.operationadd);
return item; return item;
} }