From 0835f6a5466d450d5a21a8f10944eee7a3a2cbc9 Mon Sep 17 00:00:00 2001 From: Taylor Ho Date: Fri, 22 May 2026 00:18:41 -0700 Subject: [PATCH] fix(terminal): grab cursor on hover, grabbing while dragging resize --- desktop/src/features/terminal/TerminalPanel.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/desktop/src/features/terminal/TerminalPanel.tsx b/desktop/src/features/terminal/TerminalPanel.tsx index bd4d9fa83c..0fe5640b1a 100644 --- a/desktop/src/features/terminal/TerminalPanel.tsx +++ b/desktop/src/features/terminal/TerminalPanel.tsx @@ -64,7 +64,7 @@ export function TerminalPanel({ channelId, isOpen }: TerminalPanelProps) { const previousCursor = document.body.style.cursor; const previousUserSelect = document.body.style.userSelect; - document.body.style.cursor = "row-resize"; + document.body.style.cursor = "grabbing"; document.body.style.userSelect = "none"; const handlePointerMove = (moveEvent: PointerEvent) => { @@ -98,6 +98,14 @@ export function TerminalPanel({ channelId, isOpen }: TerminalPanelProps) {
{ + const rect = e.currentTarget.getBoundingClientRect(); + e.currentTarget.style.cursor = + e.clientY - rect.top <= 6 ? "grab" : ""; + }} + onPointerLeave={(e) => { + e.currentTarget.style.cursor = ""; + }} > {/* Terminal content */}