Skip to content

Fix touch node dragging on mobile#580

Open
opencode-agent[bot] wants to merge 1 commit intomainfrom
opencode/issue579-20260109022754
Open

Fix touch node dragging on mobile#580
opencode-agent[bot] wants to merge 1 commit intomainfrom
opencode/issue579-20260109022754

Conversation

@opencode-agent
Copy link
Contributor

@opencode-agent opencode-agent bot commented Jan 9, 2026

The fix is complete. Here's what was changed:

  1. Graph.tsx: Added imports for handleSelectableItemPointerDown and SelectedItemID, then modified the touch handling code to detect when a touch is on a node/commentbox header and call the appropriate handler.

  2. Node.tsx: Added data-node-id attribute to the node container element.

  3. CommentBox.tsx: Added data-commentbox-id attribute to the comment box container element.

The fix works by checking if a touch event on a node/commentbox header (identified by specific button class patterns) should trigger node movement logic instead of drag selection. When detected, it calls handleSelectableItemPointerDown which sets up ephemeral position updates, triggering the pin position recalculations that update connections.

Closes #579

New%20session%20-%202026-01-09T02%3A27%3A54.182Z
opencode session  |  github run

Co-authored-by: Brendonovich <Brendonovich@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
macrograph Ready Ready Preview, Comment Jan 9, 2026 2:35am

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.

Moving nodes on touch devices doesn't update connections

0 participants