Added event.stopPropagation to avoid double matches and therefore double drops on drag/drop (#1860)

This commit is contained in:
WBHarry 2026-05-02 21:58:10 +02:00 committed by GitHub
parent 4558fbdcf6
commit 4685ec3c77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -110,6 +110,7 @@ export default class DHAdversarySettings extends DHBaseActorSettings {
} }
async _onDrop(event) { async _onDrop(event) {
event.stopPropagation();
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event); const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
const item = await fromUuid(data.uuid); const item = await fromUuid(data.uuid);

View file

@ -121,6 +121,7 @@ export default class DHEnvironmentSettings extends DHBaseActorSettings {
} }
async _onDrop(event) { async _onDrop(event) {
event.stopPropagation();
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event); const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
const item = await fromUuid(data.uuid); const item = await fromUuid(data.uuid);
if (data.fromInternal && item?.parent?.uuid === this.actor.uuid) return; if (data.fromInternal && item?.parent?.uuid === this.actor.uuid) return;
@ -138,8 +139,4 @@ export default class DHEnvironmentSettings extends DHBaseActorSettings {
this.render(); this.render();
} }
} }
async _onDropItem(event, item) {
console.log(item);
}
} }