fix: Prevent sidebar project dragging when using macos control+click to open context menu#873
fix: Prevent sidebar project dragging when using macos control+click to open context menu#873Noojuno wants to merge 5 commits intopingdotgg:mainfrom
Conversation
- Add shared context-menu pointerdown detection logic with unit tests - Stop propagation on right-click/Ctrl-click to avoid arming drag sensors - Suppress the follow-up project title click when opening the project context menu
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6ab08cf to
09bd3aa
Compare
781dd39 to
32f802c
Compare
32f802c to
44f8826
Compare
|
@juliusmarminge not sure what the deal is with the browser test stage failing, seems to be failing on other people's PR's too https://github.com/pingdotgg/t3code/actions/runs/22935708344/job/66566456827?pr=882 |
|
@macroscope-app review this |
…r-context-drag-mode # Conflicts: # apps/web/src/components/Sidebar.logic.ts # apps/web/src/components/Sidebar.tsx
What Changed
Updated the drag handler to ignore control+click actions when starting dragging.
Why
When using my trackpad on my MacBook, I was running into issues right clicking projects (while testing other stuff), because I was using the control+click method of triggering a right click.
This was causing the app to begin the drag state for a project when the context menu was dismissed, instead of just triggering the context menu.
UI Changes
The UI changes were kind of hard to show, but in all examples I did a normal drag, then a normal control+click and either clicked away or pressed esc to close the context menu, then moved my cursor (so not holding down click).
In the before, it kept the click action in a drag state even though I had let go of left click.
Before
Screen.Recording.2026-03-11.at.1.13.43.PM.mov
Screen.Recording.2026-03-11.at.1.14.37.PM.mov
After
Screen.Recording.2026-03-11.at.1.12.11.PM.mov
Screen.Recording.2026-03-11.at.1.11.11.PM.mov
Checklist
Note
Fix sidebar project dragging triggered by macOS ctrl+click context menu
isContextMenuPointerDownin Sidebar.logic.ts to detect right-click and macOS ctrl+left-click pointer events.Macroscope summarized ff700af.