Linux: Middle-click on file in Explorer pastes clipboard and creates new file instead of opening file in background (VSCode behavior)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Actual (Cursor): Middle‑click on a file in the Explorer does open that file and also the system middle‑click paste runs and a new file is created with the clipboard/primary selection content.

Steps to Reproduce

Open Explorer, copy some text (or select text so primary selection is set), then middle‑click on a file in the tree.

Expected Behavior

Expected (VSCode behavior): Middle‑click on a file in the Explorer opens that file in a new tab in the background (not preview).

Operating System

Linux

Version Information

Version: 2.4.22
VSCode Version: 1.105.1
Commit: 618c607a249dd7fd2ffc662c6531143833bebd40
Date: 2026-01-26T22:51:47.692Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Linux x64 6.18.8-200.fc43.x86_64

Additional Information

Same machine, same desktop (Wayland), latest VSCode with same extensions does not show this; middle‑click there correctly opens the file.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. It looks like in Explorer on Linux with Wayland, Cursor is incorrectly capturing the middle mouse button event, which triggers the system paste from the primary selection clipboard.

I’ll pass this to the team.

As a temporary workaround, you can try running Cursor under XWayland (using --ozone-platform=x11 or ELECTRON_OZONE_PLATFORM_HINT=x11) to see if the behavior changes. I know that’s not a great long-term solution.

Let me know if you find anything else related to this.

Encountering the issue, using x11 does not seems to change the behavior.

1 Like

Thanks for the info, I passed it on to the team.