-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Middle-click panning does not work over links and ports #5492
Copy link
Copy link
Closed
Labels
Description
Current Behavior
Middle mouse button panning works when clicking and dragging on empty workspace background.
However, middle-click panning does not work when the cursor is positioned over:
- A link (wire)
- A node port hitbox
In those cases, the workspace does not enter panning mode.
- For line it does not do anything just selects the line.
- For node port hitbox, it acts as left-click.
2026-02-23.02-11-33.mp4
Expected Behavior
Middle-click panning should work consistently across the entire workspace surface, including when the cursor is positioned over links and ports.
2026-02-23.02-16-22.mp4
Steps To Reproduce
Open Node-RED editor
- Create two nodes and connect them with a wire
- Middle-click and drag on empty workspace → pan works
- Middle-click and drag while cursor is positioned over:
- The wire
- A node port
Observed result: panning does not activate.
Example flow
Environment
- Node-RED version: 4.1.5
- Node.js version: v20.20.0
- npm version: 10.8.2
- Platform/OS: Ubuntu 24.04.4 LTS (Linux 6.17.0-14-generic x86_64)
- Browser: Google Chrome 145.0.7632.109 (64-bit)
A potential fix would be to ignore non-left mouse buttons in linkMouseDown and portMouseDown before calling stopPropagation(). I have tried this fix and it worked as expected. If the current behavior is not an expected behavior, i can raise a PR for this.
Reactions are currently unavailable