mirror of
https://github.com/stablyai/orca.git
synced 2026-09-21 16:02:20 +00:00
test(terminal): pin Alt+middle-click to the TUI-owned path off Mac
This commit is contained in:
+16
@@ -187,6 +187,22 @@ describe('issue 21762: middle-click native-paste suppression in mouse-tracking T
|
||||
expect(pane.terminal.focus).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
// Guards against collapsing the modifier check to `shiftKey || altKey`:
|
||||
// off Mac, xterm still forwards an Alt+middle-click, so the TUI pastes.
|
||||
it('leaves Alt+middle-click on the TUI-owned path off Mac', () => {
|
||||
const pane = buildTrackedPane('sgr')
|
||||
const { result } = renderHook(() => useTerminalPaneMobileActions(buildController(pane)))
|
||||
|
||||
const outcome = fireMiddleMouseDown(
|
||||
result.current.handlePrimarySelectionMiddleMouseDown,
|
||||
pane.container,
|
||||
{ altKey: true }
|
||||
)
|
||||
|
||||
expect(outcome.propagationStopped).toBe(false)
|
||||
expect(pane.terminal.focus).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('stops auxclick propagation too, matching the mousedown handler', () => {
|
||||
const pane = buildTrackedPane('sgr')
|
||||
const { result } = renderHook(() => useTerminalPaneMobileActions(buildController(pane)))
|
||||
|
||||
Reference in New Issue
Block a user