Skip to content

[Bug] Sidebar resize: cursor gets stuck as col-resize when dragging fast #500

@GeT-LeFt

Description

@GeT-LeFt

Description

The sidebar resize handle uses setPointerCapture on a 4px-wide element. When dragging quickly, the cursor can escape the handle area, causing pointer events to stop being delivered to the element.

Expected behavior

Dragging the sidebar resize handle should work reliably regardless of cursor speed, and releasing the mouse button should always end the drag state.

Actual behavior

  1. Cursor stuck as col-resize after releasing the mouse button outside the handle
  2. Sidebar width stops tracking the pointer mid-drag
  3. Requires a page reload to recover

Steps to reproduce

  1. Open a session with the sidebar visible (desktop layout)
  2. Grab the resize handle and drag quickly to the left or right
  3. Move the cursor fast enough to leave the 4px handle area
  4. Release the mouse button — cursor remains stuck as col-resize

Root cause

setPointerCapture on narrow elements is unreliable across browsers, especially on Linux/Wayland and touch devices. The pointermove and pointerup handlers are attached to the element via React props, so they stop firing when the browser loses pointer capture.

Fix

PR #497 replaces element-level pointer capture with document-level pointermove/pointerup/pointercancel listeners managed via useEffect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions