fix(pane): prevent drop zones from blocking clicks after workspace switch#18
Merged
amirlehmam merged 1 commit intoJun 3, 2026
Conversation
…itch In React 17+, events are handled at the React root container rather than document. Calling stopPropagation() in handleEdgeDrop/handleCenterDrop prevented the native drop event from reaching document-level listeners, so every other PaneWrapper's dragActive reset handler never fired. The result: after any tab drag-to-split, all panes across all workspaces stayed stuck with dragActive=true. Switching to another workspace then showed the drop zone overlay (highlighted sections) over every terminal with pointer-events:auto, blocking all mouse interaction. Fix: remove stopPropagation() from the two drop handlers so the drop event propagates to document and all panes reset correctly. Also add a safety-net useEffect that clears dragActive whenever a workspace becomes active, covering the edge case where dragend fires on a detached element. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f907376 to
36ffc76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e.stopPropagation()fromhandleEdgeDropandhandleCenterDropinPaneWrapper.tsxuseEffectthat clearsdragActivewhenever a workspace becomes activeRoot cause
In React 17+, synthetic event handlers fire at the React root container (not
document). CallingstopPropagation()insidehandleEdgeDrop/handleCenterDropprevented the nativedropevent from bubbling past the React root todocument. Every otherPaneWrapperlistens at thedocumentlevel fordropto resetdragActive = false— they never received the event and stayed permanently stuck withdragActive = true.After any tab drag-to-split, all panes in all workspaces had
dragActive = true. Switching to another workspace then rendered the drop zone overlay (the "highlighted sections") over every terminal withpointer-events: auto, blocking all mouse interaction.Fix
stopPropagation()from both drop handlers so the nativedropevent propagates todocumentand allPaneWrapperinstances reset correctly.useEffect— clearsdragActivewhenisWorkspaceActivetransitions totrue, covering the edge case wheredragendfires on a detached DOM element (e.g. whensplitAndMoveSurfaceremoves the source tab from the tree beforedragendfires) and never reachesdocument.Test plan
🤖 Generated with Claude Code