Show error message on drop error (#3189)

This commit is contained in:
niboshi
2025-03-24 09:52:55 +09:00
committed by GitHub
parent d5ebd7b7cb
commit cb8354bfce

View File

@@ -438,6 +438,7 @@ export class ComfyApp {
#addDropHandler() {
// Get prompt from dropped PNG or json
document.addEventListener('drop', async (event) => {
try {
event.preventDefault()
event.stopPropagation()
@@ -472,6 +473,10 @@ export class ComfyApp {
}
}
}
} catch (err: any) {
console.error('Unable to process dropped item:', err)
useToastStore().addAlert(`Unable to process dropped item: ${err}`)
}
})
// Always clear over node on drag leave