Skip to content

Commit

Permalink
Allow pasting nodes with connections in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
pythongosssss committed Sep 13, 2023
1 parent 3039b08 commit 0e4395a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,10 @@ export class ComfyApp {
*/
#addPasteHandler() {
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);
const items = data.items;

Expand Down Expand Up @@ -853,7 +857,7 @@ export class ComfyApp {
}

// 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
return true;
}
Expand Down

0 comments on commit 0e4395a

Please sign in to comment.