Files
orca/src/renderer
Borja 8ae292e2b7 Cancel native middle-click paste on tab mouseup (#2518)
On Linux with primary-selection paste enabled, middle-clicking a tab to
close it triggered an unwanted primary-selection paste into whichever
terminal became active after the close. The existing onMouseDown
preventDefault on each tab blocks Chromium's middle-button auto-scroll
but does not block the native paste pipeline, which is gated on
mouseup. After the tab unmounts via onAuxClick → onClose, focus moves
to xterm's hidden textarea on the newly active terminal, and the
primary selection lands there.

Add a small named helper preventMiddleButtonDefault and wire it as
onMouseUp on SortableTab, BrowserTab, and EditorFileTab. Mirrors the
preventDefault that usePrimarySelectionPaste's enabled=false branch
already performs for non-tab surfaces. No platform branching: the
mouseup cancel is a no-op on macOS and Windows because there is no
native primary-selection paste pipeline to cancel.

Fixes #2346
2026-05-22 00:13:53 -07:00
..
2026-03-17 01:40:24 -07:00
2026-05-15 05:44:25 -04:00