fix(devtools): stop delegating pointermove on the trigger #544
With devtools mounted, a pointermove listener on document can see event.currentTarget === <html> instead of document. This breaks react-resizable-panels' hover cursor after a remount. This PR makes the trigger listen to pointermove on its buttons directly, so Solid no longer installs a delegated pointermove handler on document.
🎯 Changes#
- Solid delegates
onPointerMoveto onedocumentlistener. That handler redefinesevent.currentTargetwith a getter and does not restore it (solid-js 1.9.15 still does this). - Each
pointermovelistener ondocumentthat runs after Solid's handler sees<html>. react-resizable-panels readscurrentTarget.defaultView, getsundefined, and skips the cursor. - The trigger's two
pointermovehandlers now useon:pointermove, a native listener on the<button>. No other devtools code delegatespointermove. - The root cause is in Solid's
eventHandler. This PR removes the devtools' part of it.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested code changes locally with
pnpm test:pr, or these tests do not apply to this pull request. - I fully understand the code in this pull request, including any code generated with AI assistance.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
Testing#
Commands run
vitest runinpackages/devtools: 371 tests pass, with the existing trigger drag tests that firepointermove.- The new test fails without the fix:
expected <html>… to be #document. eslint,tsc, andprettier --checkinpackages/devtools: pass.- I did not run the full
pnpm test:pr.
Manual test
- Open the StackBlitz repro in #526.
- Before this fix: wait for devtools to load, change the
Groupkey, and hover the separator. The cursor staysauto. - After this fix: the cursor is
ew-resizeafter the remount. - Drag the floating trigger and the docked edge tab. Both still move with the pointer.
How this PR makes testing easy
A test in trigger.test.tsx adds a document pointermove listener after the trigger renders and expects currentTarget to be document.
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 onPointerMove still install the delegated handler. To undo, revert this PR.
🤖 Generated with Claude Code
- 1
View your CI Pipeline Execution ↗ for commit 6e663121cd2ff495cfc8ae50d2cefb52c815cecc
Command Status Duration Result nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded 3m 36s View ↗ nx run-many --target=test:e2e --parallel=1 --pr...✅ Succeeded 1m 14s View ↗ nx run-many --targets=build --exclude=examples/...✅ Succeeded 34s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-02 13:54:34UTCMore templates
- @tanstack/devtools-example-angular-a11y-devtools
- @tanstack/devtools-example-angular-basic
- @tanstack/devtools-example-angular-panel
- ssr
- @tanstack/devtools-example-angular-with-devtools
- @tanstack/devtools-example-preact-basic
- @tanstack/devtools-custom-devtools-preact
- @tanstack/react-devtools-a11y-example
- @tanstack/devtools-example-react-basic
- start-repro
- @tanstack/devtools-custom-devtools
- tanstack-start-example-counter
- @tanstack/devtools-example-react-https
- start
- start-cloudflare
- start-nitro
- @tanstack/devtools-example-react-time-travel
- @tanstack/solid-devtools-a11y-example
- @tanstack/devtools-example-solid-basic
- @tanstack/devtools-example-devtools-ui
- @tanstack/devtools-example-solid-start
- @tanstack/query-example-vue-basic
@tanstack/angular-devtools
npm i https://pkg.pr.new/@tanstack/angular-devtools@544@tanstack/devtools
npm i https://pkg.pr.new/@tanstack/devtools@544@tanstack/devtools-a11y
npm i https://pkg.pr.new/@tanstack/devtools-a11y@544@tanstack/devtools-bundler-core
npm i https://pkg.pr.new/@tanstack/devtools-bundler-core@544@tanstack/devtools-client
npm i https://pkg.pr.new/@tanstack/devtools-client@544@tanstack/devtools-rspack
npm i https://pkg.pr.new/@tanstack/devtools-rspack@544@tanstack/devtools-ui
npm i https://pkg.pr.new/@tanstack/devtools-ui@544@tanstack/devtools-utils
npm i https://pkg.pr.new/@tanstack/devtools-utils@544@tanstack/devtools-vite
npm i https://pkg.pr.new/@tanstack/devtools-vite@544@tanstack/devtools-webmcp
npm i https://pkg.pr.new/@tanstack/devtools-webmcp@544@tanstack/devtools-event-bus
npm i https://pkg.pr.new/@tanstack/devtools-event-bus@544@tanstack/devtools-event-client
npm i https://pkg.pr.new/@tanstack/devtools-event-client@544@tanstack/preact-devtools
npm i https://pkg.pr.new/@tanstack/preact-devtools@544@tanstack/react-devtools
npm i https://pkg.pr.new/@tanstack/react-devtools@544@tanstack/solid-devtools
npm i https://pkg.pr.new/@tanstack/solid-devtools@544@tanstack/svelte-devtools
npm i https://pkg.pr.new/@tanstack/svelte-devtools@544@tanstack/vue-devtools
npm i https://pkg.pr.new/@tanstack/vue-devtools@544commit:
6e66312AlemTuzlak merged thisf315fe8
AlemTuzlak closed this
Sign in to join this conversation.
Warning
Review limit reached#
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 11 minutes.
Check out review usage here.
View limit details
Limit details: You’ve used all 4 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
Configuration used: Repository: TanStack/devtools/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
47cccbb1-b3b7-4337-8c8e-5476d51320ae📥 Commits
Reviewing files that changed from the base of the PR and between afa01fec1751308eb5f60e737e408f2fc34e669a and 6e663121cd2ff495cfc8ae50d2cefb52c815cecc.
📒 Files selected for processing (3)
.changeset/native-trigger-pointermove.mdpackages/devtools/src/components/trigger.test.tsxpackages/devtools/src/components/trigger.tsxThanks 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