Allow pasting nodes with connections in firefox

This commit is contained in:
pythongosssss 2023-09-13 18:42:44 +01:00
parent 3039b08eb1
commit 0e4395a8a3
1 changed files with 5 additions and 1 deletions

View File

@ -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;
@ -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;
}