Skip to content

Fix panel resize not updating visually on first drag#63

Merged
an0nn30 merged 1 commit intomainfrom
fix/panel-resize-first-drag
Mar 20, 2026
Merged

Fix panel resize not updating visually on first drag#63
an0nn30 merged 1 commit intomainfrom
fix/panel-resize-first-drag

Conversation

@an0nn30
Copy link
Owner

@an0nn30 an0nn30 commented Mar 20, 2026

Summary

  • The xterm.js WebGL canvas was overpainting the panel area during resize drag because #terminal-host lacked overflow: hidden — the canvas retained its old pixel dimensions while the flex layout shrank, covering the panel until the debounced fitAddon.fit() fired 100ms later
  • Switched resize handles from mouse events to pointer events with setPointerCapture() to prevent native drag-and-drop interference
  • Added dragstart prevention and touch-action: none on resize handles

Test plan

  • Launch app, verify SSH panel (right) resizes in real-time on the very first drag attempt
  • Verify files panel (left) also resizes correctly on first drag
  • Confirm panel width persists after resize and app restart
  • Verify terminal content reflows properly during and after panel resize

🤖 Generated with Claude Code

The xterm.js WebGL canvas was overpainting the panel area during drag
because #terminal-host lacked overflow:hidden. The canvas retained its
old pixel dimensions while the flex layout shrank, covering the panel
until the debounced fitAddon.fit() fired 100ms later.

- Add overflow:hidden to #terminal-host so the canvas is clipped
  immediately when the flex layout recalculates
- Switch resize handles from mouse events to pointer events with
  setPointerCapture to prevent native drag-and-drop interference
- Block dragstart on resize handles and set touch-action:none
@an0nn30 an0nn30 merged commit 763f132 into main Mar 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant