"examples/vscode:/vscode.git/clone" did not exist on "19f53cf249d69c81be3005d582d37530f0a3aef7"
Commit 0e4395a8 authored by pythongosssss's avatar pythongosssss
Browse files

Allow pasting nodes with connections in firefox

parent 3039b08e
...@@ -671,6 +671,10 @@ export class ComfyApp { ...@@ -671,6 +671,10 @@ export class ComfyApp {
*/ */
#addPasteHandler() { #addPasteHandler() {
document.addEventListener("paste", (e) => { document.addEventListener("paste", (e) => {
// ctrl+shift+v is used to paste nodes with connections
// this is handled by litegraph
if(this.shiftDown) return;
let data = (e.clipboardData || window.clipboardData); let data = (e.clipboardData || window.clipboardData);
const items = data.items; const items = data.items;
...@@ -853,7 +857,7 @@ export class ComfyApp { ...@@ -853,7 +857,7 @@ export class ComfyApp {
} }
// Ctrl+V Paste // Ctrl+V Paste
if ((e.key === 'v' || e.key == 'V') && (e.metaKey || e.ctrlKey)) { if ((e.key === 'v' || e.key == 'V') && (e.metaKey || e.ctrlKey) && !e.shiftKey) {
// Trigger onPaste // Trigger onPaste
return true; return true;
} }
......
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