Fix dragging AE from compendium or within same actor (#1997)

This commit is contained in:
Carlos Fernandez 2026-06-13 05:30:27 -04:00 committed by GitHub
parent 7a631c27a7
commit 9f26c53af5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 40 deletions

View file

@ -1193,15 +1193,6 @@ export default class CharacterSheet extends DHBaseActorSheet {
});
}
/** @inheritdoc */
async _onDragStart(event) {
const inventoryItem = event.currentTarget.closest('.inventory-item');
if (inventoryItem) {
event.dataTransfer.setDragImage(inventoryItem.querySelector('img'), 60, 0);
}
super._onDragStart(event);
}
async _onDropItem(event, item) {
const setupCriticalItemTypes = ['class', 'subclass', 'ancestry', 'community'];
if (this.document.system.needsCharacterSetup && setupCriticalItemTypes.includes(item.type)) {