Skip to content

Fix desktop/laptop touchscreen pan/zoom and touch interaction routing#63

Closed
flooryyyy wants to merge 1 commit into3xpyth0n:mainfrom
flooryyyy:fix-desktop-touchscreen-support
Closed

Fix desktop/laptop touchscreen pan/zoom and touch interaction routing#63
flooryyyy wants to merge 1 commit into3xpyth0n:mainfrom
flooryyyy:fix-desktop-touchscreen-support

Conversation

@flooryyyy
Copy link
Contributor

@flooryyyy flooryyyy commented Mar 25, 2026

Note

PR used GPT 5.4. Submitted as draft in case of code review and refactoring.

Summary

This draft fixes the main desktop-touchscreen canvas issues:

  • restores two-finger pinch zoom on the canvas
  • restores one-finger canvas pan on empty space
  • prevents canvas pan from competing with block-content scrolling
  • keeps resize handles touch-owned
  • moves the touch gesture handling onto pointer events so touch and pen follow the same event path
    React Flow uses

Details

The main change is a dedicated touch viewport handler for the editor canvas, plus narrower touch
routing:

  • pane touches control canvas pan and pinch
  • block-content touches stay with block scrolling/editing
  • resize controls keep touch-action: none

Manual testing

Tested on a desktop touchscreen setup:

  • two-finger pinch zoom works
  • one-finger pan on empty canvas works
  • scrolling inside scrollable block content no longer pans the canvas at the same time
  • pen interactions still work for moving and resizing blocks

Notes

This is a draft because I’d like review on the touch-routing approach and any React Flow-specific
refinements before marking it ready.

Canvas pan, zoom, and scrolling work reliably with a touchscreen.

Moving or resizing blocks with finger input may still be inconsistent on some touchscreen devices due
to odd input behavior from touchscreens and how those events are interpreted. Moving and resizing with
a pen works correctly.

@3xpyth0n 3xpyth0n self-requested a review March 25, 2026 11:57
@3xpyth0n
Copy link
Owner

Opened reviewed & fixed PR in #64.

@3xpyth0n 3xpyth0n closed this Mar 25, 2026
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.

2 participants