"configs/quantization/vscode:/vscode.git/clone" did not exist on "8bc0da34b4d1ae737af9f4e3dd713e76a64de202"
Commit 019bd519 authored by pythongosssss's avatar pythongosssss
Browse files

Add dragleave handler to remove stuck highlight

parent f2a6cff4
......@@ -289,13 +289,21 @@ class ComfyApp {
this.dragOverNode = null;
// Node handles file drop, we dont use the built in onDropFile handler as its buggy
// If you drag multiple files it will call it multiple times with the same file
if (n && n.onDragDrop && await n.onDragDrop(event)) {
if (n && n.onDragDrop && (await n.onDragDrop(event))) {
return;
}
await this.handleFile(event.dataTransfer.files[0]);
});
// Always clear over node on drag leave
this.canvasEl.addEventListener("dragleave", async () => {
if (this.dragOverNode) {
this.dragOverNode = null;
this.graph.setDirtyCanvas(false, true);
}
});
// Add handler for dropping onto a specific node
this.canvasEl.addEventListener(
"dragover",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment