Images can now be uploaded by dragging from another window in chromium.

This commit is contained in:
comfyanonymous 2023-08-09 11:31:27 -04:00
parent a5599ed42c
commit 5ac96897e9
1 changed files with 1 additions and 1 deletions

View File

@ -433,7 +433,7 @@ export const ComfyWidgets = {
// Add handler to check if an image is being dragged over our node
node.onDragOver = function (e) {
if (e.dataTransfer && e.dataTransfer.items) {
const image = [...e.dataTransfer.items].find((f) => f.kind === "file" && f.type.startsWith("image/"));
const image = [...e.dataTransfer.items].find((f) => f.kind === "file");
return !!image;
}