Only clear clipboard when copying nodes.

This commit is contained in:
comfyanonymous 2023-09-20 23:16:01 -04:00
parent 4d41bd595c
commit 0793eb9269
1 changed files with 2 additions and 1 deletions

View File

@ -753,8 +753,9 @@ export class ComfyApp {
// Default system copy
return;
}
// copy nodes and clear clipboard
if (this.canvas.selected_nodes) {
if (e.target.className === "litegraph" && this.canvas.selected_nodes) {
this.canvas.copyToClipboard();
e.clipboardData.setData('text', ' '); //clearData doesn't remove images from clipboard
e.preventDefault();