Comfy-Org / Comfy-Org/ComfyUI_frontend

[Bug]: When mask editor is open, middle click pastes nodes in the clipboard in the background

Open
#2,409 4 comments 3 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Frontend Version

ComfyUI_frontend v1.8.13

### Expected Behavior

Middle click should not paste anything, it should just pan in the mask editor.

### Actual Behavior

When mask editor is open, middle click pastes nodes in the clipboard in the background.
This happens in Linux with chromium based browsers. I haven't tested it in Windows or Mac.
In Firefox and forks, by default, middle click always pastes the clipboard, outside the mask editor too, but disabling the option in firefox settings disables the behaviour, and it doesn't happen even in the mask editor.

### Steps to Reproduce

It happens with any node copied in the clipboard and pressing middle click in the mask editor.

### Debug Logs

```powershell
Nothing happens in the console.
```

### Browser Logs

```
Loaded brush from cache: {type: 'arc', size: 14, opacity: 1, hardness: 1, smoothingPrecision: 10} index-B4tExwG7.js:49382
URL {origin: 'http://127.0.0.1:8188', protocol: 'http:', username: '', password: '', host: '127.0.0.1:8188', …} index-B4tExwG7.js:51693
```

That appears when entering the mask editor, nothing gets logged when middle click is pressed.

### Setting JSON

[comfy.settings.json](https://github.com/user-attachments/files/18645215/comfy.settings.json)

I've tried with "KJNodes.MiddleClickDefault" both in true and false.

### What browsers do you use to access the UI ?

Vivaldi and Brave (the problem happens).
Firefox (it doesn't happen disabling middle mouse paste in the about:config settings).

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.