From 4685ec3c778398fe3499939bf4de3a1000cbaba5 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sat, 2 May 2026 21:58:10 +0200 Subject: [PATCH] Added event.stopPropagation to avoid double matches and therefore double drops on drag/drop (#1860) --- module/applications/sheets-configs/adversary-settings.mjs | 1 + module/applications/sheets-configs/environment-settings.mjs | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/applications/sheets-configs/adversary-settings.mjs b/module/applications/sheets-configs/adversary-settings.mjs index 6593f23d..57405675 100644 --- a/module/applications/sheets-configs/adversary-settings.mjs +++ b/module/applications/sheets-configs/adversary-settings.mjs @@ -110,6 +110,7 @@ export default class DHAdversarySettings extends DHBaseActorSettings { } async _onDrop(event) { + event.stopPropagation(); const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event); const item = await fromUuid(data.uuid); diff --git a/module/applications/sheets-configs/environment-settings.mjs b/module/applications/sheets-configs/environment-settings.mjs index bc0efef2..6d74f9c6 100644 --- a/module/applications/sheets-configs/environment-settings.mjs +++ b/module/applications/sheets-configs/environment-settings.mjs @@ -121,6 +121,7 @@ export default class DHEnvironmentSettings extends DHBaseActorSettings { } async _onDrop(event) { + event.stopPropagation(); const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event); const item = await fromUuid(data.uuid); if (data.fromInternal && item?.parent?.uuid === this.actor.uuid) return; @@ -138,8 +139,4 @@ export default class DHEnvironmentSettings extends DHBaseActorSettings { this.render(); } } - - async _onDropItem(event, item) { - console.log(item); - } }