ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

+ frame selection

Open laurentopia opened this issue 2 years ago • 8 comments

standard for node graph is : left dragging in the canvas = frame selection but LMB is used to scroll canvas so suggested change is: MMB to scroll canvas (every mouse has a clickable scroll wheel these days) and LMB on canvas = drag a frame to select nodes.

laurentopia avatar May 06 '23 00:05 laurentopia

100% agree. That would further help mitigate accidentally dragging groups/nodes.

WASasquatch avatar May 06 '23 01:05 WASasquatch

Yeah, I brought that suggestion up among some others before, but it didn't get any traction, unfortunately. I definitely think it's really necessary to improve the usability of ComfyUI.

DivinoAG avatar May 06 '23 04:05 DivinoAG

shall be option

zba avatar Oct 09 '23 21:10 zba

Doesn't this fall short of all the laptop usage, with no scroll wheels? Would need an alt drag

WASasquatch avatar Oct 09 '23 23:10 WASasquatch

In this issue, some possible solutions were discussed: #1016

Lex-DRL avatar Jul 04 '24 10:07 Lex-DRL

Personally, I like right click and dragging. This really just needs to be a preference setting in a keybinds section. --- The reason I'm here I've been out of the loop for a bit while I've been getting other work done. Today I update comfyui and find that I can't even move the graph around at all, I also can't drag any nodes or scroll in or out. All I can do is click on buttons.

bringrainfire avatar Jul 21 '24 06:07 bringrainfire

LMB click-drag to box select items is an absolute must for any common sense node editing UI. Currently MMB click-drag pans, so there's no reason to duplicate the functionality to LMB click-drag.

And if you argue that not every device has MMB, then the panning can also be assigned to RMB click-drag, which currently does nothing. Comfy UI is capable of distinguishing between click and click-drag operation, so assigning panning to RMB click-drag will not interfere with RMB click context menu.

Rawalanche avatar Jun 16 '25 12:06 Rawalanche

Maybe, after frontend went separate, this issue should be closed in favor of the new one in another repo? https://github.com/Comfy-Org/ComfyUI_frontend/issues/4198

Lex-DRL avatar Jun 17 '25 06:06 Lex-DRL

I found this through frustration of muscle memory, even though it works and I know I can drag to pan with left mouse I just keep using middle mouse to do it! Probably from years of using FreeCAD / OpenSCAD / KiCAD. This actually works though but after I release middle mouse it seems to dupe/paste the entire workflow again! Its quite offset and sometimes I don't notice till I zoom out and see tonnes of unwanted nodes!!

bobemoe avatar Jul 15 '25 19:07 bobemoe

@bobemoe If you're on Linux, this might be Linux fault, not Comfy's. Linux has a very annoying "feature" of middle-mouse-paste, which is next to impossible to fully disable, because it's embedded into it's very core - with the justification for it going all the way back to the times of mainframes. It has nothing to do with Comfy or even your browser. You might want to google "middle-mouse paste on Linux"... but I must warn you, the result might be disappointing. Basically, all the solutions are hacks which work only partially.

Lex-DRL avatar Jul 15 '25 19:07 Lex-DRL

Actually, this turned out to be much simpler than that! While you're right that Linux has the middle-click paste feature, I think this specific issue is just ComfyUI (the web app) not properly handling the middle-click event.

I knocked up a quick test page and confirmed that middle-click paste can be easily blocked in web applications with a simple preventDefault() call on the auxclick event (checking for e.button === 1). The PRIMARY clipboard functionality remains completely intact for other applications.

This should be fixed in ComfyUI itself. For now, you can work around it by running this in your browser console once ComfyUI is loaded:

document.querySelector('#graph-canvas').addEventListener('auxclick', function(e) {
    if (e.button === 1) {
        e.preventDefault();
    }
}, true);

This blocks the paste while preserving the panning functionality. It's a simple fix that would solve this issue for all Linux users without requiring system-level changes or workarounds.

bobemoe avatar Jul 16 '25 12:07 bobemoe

@bobemoe Does the issue of MMB-paste exist currently? If so, could you open it here? https://github.com/Comfy-Org/ComfyUI_frontend/issues

My Linux istallation is so customized that I'm not even sure if I have one of those hacks messing around with clipboard just to disable it.

Lex-DRL avatar Jul 16 '25 13:07 Lex-DRL

There was a kind of related issue but not quite, so I created https://github.com/Comfy-Org/ComfyUI_frontend/issues/4464

bobemoe avatar Jul 16 '25 17:07 bobemoe

This issue has been transferred to the frontend repository: https://github.com/Comfy-Org/ComfyUI_frontend/issues/6450

Please continue the discussion there.

comfy-pr-bot avatar Oct 30 '25 05:10 comfy-pr-bot