{{ message }}
Repository navigation
fix(devtools): stop delegating pointermove on the trigger - #544
Open
AlemTuzlak wants to merge 1 commit into
Open
AlemTuzlak wants to merge 1 commit into
AlemTuzlak wants to merge 1 commit into
Conversation
Solid delegates `onPointerMove` to one document listener. Its handler redefines event.currentTarget with a getter and does not restore it, so every pointermove listener that runs after it on document sees <html> (solid-js 1.9.15 still does this). react-resizable-panels reads currentTarget.defaultView and skipped its cursor after a remount, when its listener ran after Solid's. The trigger's two pointermove handlers now use `on:pointermove`, a native listener on the button. Nothing else in the devtools delegates pointermove. Fixes #526
|
View your CI Pipeline Execution ↗ for commit 6e66312
☁️ Nx Cloud last updated this comment at |
This branch has not been deployed
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.

With devtools mounted, a
pointermovelistener ondocumentcan seeevent.currentTarget === <html>instead ofdocument. This breaks react-resizable-panels' hover cursor after a remount. This PR makes the trigger listen topointermoveon its buttons directly, so Solid no longer installs a delegatedpointermovehandler ondocument.🎯 Changes
onPointerMoveto onedocumentlistener. That handler redefinesevent.currentTargetwith a getter and does not restore it (solid-js 1.9.15 still does this).pointermovelistener ondocumentthat runs after Solid's handler sees<html>. react-resizable-panels readscurrentTarget.defaultView, getsundefined, and skips the cursor.pointermovehandlers now useon:pointermove, a native listener on the<button>. No other devtools code delegatespointermove.eventHandler. This PR removes the devtools' part of it.✅ Checklist
pnpm test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Testing
Commands run
vitest runinpackages/devtools: 371 tests pass, with the existing trigger drag tests that firepointermove.expected <html>… to be #document.eslint,tsc, andprettier --checkinpackages/devtools: pass.pnpm test:pr.Manual test
Groupkey, and hover the separator. The cursor staysauto.ew-resizeafter the remount.How this PR makes testing easy
A test in
trigger.test.tsxadds adocumentpointermovelistener after the trigger renders and expectscurrentTargetto bedocument.Linked issues
Fixes #526
Risk / rollback
Low. The handlers run on the same buttons, and pointer capture still sends moves to them. Plugins that use Solid's
onPointerMovestill install the delegated handler. To undo, revert this PR.🤖 Generated with Claude Code