From 0c39efe32fabb7ed2eee9129e5eefe7a6610ccae Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 26 Jan 2025 14:52:37 -0700 Subject: [PATCH] Change the default bringToFront behaviour to not do it automatically --- module/Apps/GenericApp.mjs | 2 +- module/Apps/utils.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Apps/GenericApp.mjs b/module/Apps/GenericApp.mjs index edcb4a8..05efced 100644 --- a/module/Apps/GenericApp.mjs +++ b/module/Apps/GenericApp.mjs @@ -33,7 +33,7 @@ export function GenericAppMixin(HandlebarsApp) { async render(options = {}, _options = {}) { super.render(options, _options); const instance = foundry.applications.instances.get(this.id); - if (instance !== undefined && !options.noBringToFront) { + if (instance !== undefined && options.orBringToFront) { instance.bringToFront(); }; }; diff --git a/module/Apps/utils.mjs b/module/Apps/utils.mjs index ebc1d22..ff3d84a 100644 --- a/module/Apps/utils.mjs +++ b/module/Apps/utils.mjs @@ -11,7 +11,7 @@ export async function editItemFromElement(target) { const itemId = itemEl.dataset.itemId; if (!itemId) { return }; const item = await fromUuid(itemId); - item.sheet.render({ force: true }); + item.sheet.render({ force: true, orBringToFront: true }); }; /**