Skip to content

fix: prevent iOS mobile zoom from corrupting canvas interactions#38

Open
christopherdebeer wants to merge 1 commit into
mainfrom
claude/ios-zoom-fix-01KdBtkkZ4w7KUGo3yYTvr9P
Open

fix: prevent iOS mobile zoom from corrupting canvas interactions#38
christopherdebeer wants to merge 1 commit into
mainfrom
claude/ios-zoom-fix-01KdBtkkZ4w7KUGo3yYTvr9P

Conversation

@christopherdebeer

Copy link
Copy Markdown
Owner
  • Add visual viewport scale detection and coordinate compensation
  • Block iOS gesture events (gesturestart/change/end) that trigger native zoom
  • Monitor visualViewport.resize to detect and recover from zoom state
  • Add CSS hardening (-webkit-touch-callout, -webkit-tap-highlight-color)
  • Add onVisualViewportZoom handler to CanvasController for state recovery
  • Enhance viewport meta with minimum-scale=1 and viewport-fit=cover

When iOS Safari triggers native browser zoom, pointer coordinates become misaligned between visual and layout viewports. This fix compensates for the offset and clears corrupted state when zoom is detected.

https://claude.ai/code/session_01KdBtkkZ4w7KUGo3yYTvr9P

- Add visual viewport scale detection and coordinate compensation
- Block iOS gesture events (gesturestart/change/end) that trigger native zoom
- Monitor visualViewport.resize to detect and recover from zoom state
- Add CSS hardening (-webkit-touch-callout, -webkit-tap-highlight-color)
- Add onVisualViewportZoom handler to CanvasController for state recovery
- Enhance viewport meta with minimum-scale=1 and viewport-fit=cover

When iOS Safari triggers native browser zoom, pointer coordinates become
misaligned between visual and layout viewports. This fix compensates for
the offset and clears corrupted state when zoom is detected.

https://claude.ai/code/session_01KdBtkkZ4w7KUGo3yYTvr9P
@vercel

vercel Bot commented Jan 26, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
parcland Ready Ready Preview, Comment Jan 26, 2026 11:01pm

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