Skip to content

Fix HTML preview drag capture#166

Merged
jsgrrchg merged 1 commit into
mainfrom
fix/issue-165-html-drag-shield
May 28, 2026
Merged

Fix HTML preview drag capture#166
jsgrrchg merged 1 commit into
mainfrom
fix/issue-165-html-drag-shield

Conversation

@jsgrrchg
Copy link
Copy Markdown
Owner

Summary

  • Add an internal drag iframe shield for HTML previews.
  • Make HTML preview iframes temporarily inert while files or agent sessions are dragged from the sidebar.
  • Cover file-tree, agent-sidebar, workspace-tab, and cancellation behavior in HtmlTabView tests.

Root Cause

HTML previews render inside an iframe. When an internal drag crosses that iframe, the frame can swallow the window-level move/up events that keep sidebar drags and multi-pane drop previews alive. The drag state can then remain stuck and leave the workspace drop system in a broken state.

Validation

  • npm test -- HtmlTabView.test.tsx MultiPaneWorkspace.test.tsx AgentsSidebarPanel.test.tsx
  • npx eslint src/features/editor/HtmlTabView.tsx src/features/editor/HtmlTabView.test.tsx src/features/editor/useInternalDragIframeShield.ts
  • git diff --check

Fixes #165

@jsgrrchg jsgrrchg marked this pull request as ready for review May 28, 2026 20:48
@jsgrrchg jsgrrchg merged commit ddc1690 into main May 28, 2026
7 checks passed
@jsgrrchg jsgrrchg deleted the fix/issue-165-html-drag-shield branch May 30, 2026 11:29
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.

Dragging files over html files breaks the multi-pane system

1 participant