Keep finger pan/zoom working after using the pen #1

Merged
reudy merged 1 commit from agent/fix-finger-navigation into main 2026-09-26 23:40:46 +02:00 AGit
Member

Problem

After writing with the pen, finger pan and zoom stopped working:

  • every touch was ignored for 5 s after any pen activity, including hover, so a hover-capable pen held near the screen kept fingers locked out,
  • after that, a one-finger drag on a page drew ink instead of panning ("Draw with finger" is on by default),
  • a one-finger drag on the background did nothing while an ink tool was selected.

Fix

  • Once a pen has been used, fingers only pan and zoom, never ink.
  • The 5 s session and hover lockouts now only block finger ink, not navigation.
  • Touches are still rejected while the pen is down, for palm-sized contacts and within 150 ms of pen activity, so a resting palm can't move the canvas while writing.
  • A one-finger drag off the page always pans.
  • Without a pen, "Draw with finger" works as before. Settings descriptions are updated.

Testing

  • New src/lib/ink/palm.test.ts (6 tests); all 24 unit tests and npm run check pass.
  • Replayed synthetic pen/touch events in Firefox (Playwright): before the fix, pan and pinch failed right after the pen and 5.5 s later; after it, both work, a palm touching down while the pen is down doesn't pan, and finger drawing still works when no pen was used.
  • Not yet tried on a real tablet.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL

## Problem After writing with the pen, finger pan and zoom stopped working: - every touch was ignored for 5 s after any pen activity, including hover, so a hover-capable pen held near the screen kept fingers locked out, - after that, a one-finger drag on a page drew ink instead of panning ("Draw with finger" is on by default), - a one-finger drag on the background did nothing while an ink tool was selected. ## Fix - Once a pen has been used, fingers only pan and zoom, never ink. - The 5 s session and hover lockouts now only block finger ink, not navigation. - Touches are still rejected while the pen is down, for palm-sized contacts and within 150 ms of pen activity, so a resting palm can't move the canvas while writing. - A one-finger drag off the page always pans. - Without a pen, "Draw with finger" works as before. Settings descriptions are updated. ## Testing - New `src/lib/ink/palm.test.ts` (6 tests); all 24 unit tests and `npm run check` pass. - Replayed synthetic pen/touch events in Firefox (Playwright): before the fix, pan and pinch failed right after the pen and 5.5 s later; after it, both work, a palm touching down while the pen is down doesn't pan, and finger drawing still works when no pen was used. - Not yet tried on a real tablet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
agent added 1 commit 2026-09-26 22:11:44 +02:00
After writing with the pen, fingers could no longer navigate:
- every touch was ignored for 5 s after any pen activity (and for as long
  as a hover-capable pen stayed near the screen),
- after that, a one-finger drag on a page drew ink instead of panning,
- a one-finger drag on the background did nothing while an ink tool was on.

Once a pen has been used, fingers now only pan and zoom. The 5 s session
and hover lockouts only block finger ink; touches are still rejected while
the pen is down, for palm-sized contacts and within 150 ms of pen activity.
A finger drag off the page always pans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
reudy merged commit 08a530c78f into main 2026-09-26 23:40:46 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/Papure#1
No description provided.