Comfy-Org / Comfy-Org/ComfyUI

Middle mouse drag causes unintended paste of clipboard nodes on release

Open
#9,863 4 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

Panning the workflow canvas with middle mouse drag should behave as a pure pan operation.
It should work the same way as panning with left mouse drag.

### Actual Behavior

When panning with middle mouse drag, releasing the button (mouseup) pastes the node from the clipboard automatically.

As a workaround, I click on empty space and press Ctrl + C to clear the clipboard.
Otherwise, unwanted nodes keep appearing every time I pan.

### Steps to Reproduce

- Copy any node so that it is stored in the clipboard (e.g. Ctrl + C).
- Pan the canvas using middle mouse drag.
- Release the middle mouse button.
- → The node from the clipboard is pasted into the canvas.

I also tried starting ComfyUI with the --disable-all-custom-nodes option, but the issue still occurs.

### Debug Logs

```powershell
N/A
```

### Other

**Environment**

- ComfyUI: 0.3.57, 0.3.59
- OS: Linux Mint 22.1

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in ComfyUI 0.3.57 or 0.3.59 on Linux Mint by copying a node, panning with the middle mouse button, and releasing it. Compare this with left-button panning and verify that releasing a middle-drag no longer pastes the copied node; the payload names no files or tests to inspect.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.