Skip to content

fix(desktop): prevent webview from capturing drag events during pane rearrangement#1547

Merged
Kitenite merged 1 commit into
mainfrom
kitenite/browser-drag
Feb 17, 2026
Merged

fix(desktop): prevent webview from capturing drag events during pane rearrangement#1547
Kitenite merged 1 commit into
mainfrom
kitenite/browser-drag

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 17, 2026

Summary

  • Electron webviews render in a separate compositing layer and capture drag events, breaking React Mosaic pane drag-and-drop when the cursor moves over a browser pane
  • Disables pointer-events on pane content during drag so mosaic drop targets receive events correctly

Changes

  • BasePaneWindow: Read isDragging from drag pane store; apply pointer-events: none on the content container while a pane drag is in progress

Test Plan

  • Open a browser pane alongside other panes
  • Drag a pane and move the cursor over the browser pane — drop targets should appear correctly
  • Verify normal pane interaction (clicking, typing) still works when not dragging

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced pane drag functionality by preventing pointer events from interfering during drag operations, resulting in smoother and more responsive dragging behavior when managing workspace panes.

…rearrangement

Electron webviews render in a separate compositing layer and capture
drag events, breaking React Mosaic pane drag-and-drop when the cursor
moves over a browser pane. Disable pointer events on pane content
during drag so the mosaic drop targets receive events correctly.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The change introduces a new isDragging flag from useDragPaneStore to the BasePaneWindow component. When a pane is being dragged, the content container's pointerEvents style is set to none to disable pointer interactions during the drag operation.

Changes

Cohort / File(s) Summary
Pane Drag Interaction
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/components/BasePaneWindow/BasePaneWindow.tsx
Added conditional pointerEvents: none styling to content container based on isDragging flag from drag pane store to prevent pointer interactions during pane drag operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A pane that floats without a care,
Now hops through drags with pointer's prayer—
When whiskers twitch and dragging's true,
No clicks shall pass, none's the view! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: preventing webview from capturing drag events during pane rearrangement, which directly addresses the core issue being fixed.
Description check ✅ Passed The PR description comprehensively covers the issue, solution, and testing approach, though it deviates from the template structure by using a custom format with Summary, Changes, and Test Plan sections instead of the required template sections.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/browser-drag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite Kitenite merged commit b8310d4 into main Feb 17, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app
  • ⚠️ Streams Fly.io app

Thank you for your contribution! 🎉

@Kitenite Kitenite deleted the kitenite/browser-drag branch February 27, 2026 09: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.

1 participant