diff --git a/packages/ui/src/components/resize-handle.tsx b/packages/ui/src/components/resize-handle.tsx index f0c28f2b329..c2c190e16b0 100644 --- a/packages/ui/src/components/resize-handle.tsx +++ b/packages/ui/src/components/resize-handle.tsx @@ -111,6 +111,12 @@ export function ResizeHandle(props: ResizeHandleProps) { document.addEventListener("mouseup", onMouseUp) } + // The handle holds the pointer until the button comes up, so hover stays on it rather than following the pointer + // across the panels it resizes, each crossing restyling their contents. + const handlePointerDown = (e: PointerEvent & { currentTarget: HTMLDivElement }) => { + if (e.pointerType === "mouse" && e.button === 0) e.currentTarget.setPointerCapture(e.pointerId) + } + return (
)